update all code after version update

This commit is contained in:
Sebastian Thiel
2020-07-10 09:41:44 +08:00
parent c949124df5
commit d1ffa68287
1798 changed files with 692798 additions and 59942 deletions

View File

@@ -1084,12 +1084,15 @@ impl<'n> Engine<'n> {
let engine = Engine {
opt: opt,
hub: api::Fitness::new(client, auth),
gp: vec!["alt", "fields", "key", "oauth-token", "pretty-print", "quota-user", "user-ip"],
gp: vec!["$-xgafv", "access-token", "alt", "callback", "fields", "key", "oauth-token", "pretty-print", "quota-user", "upload-type", "upload-protocol"],
gpm: vec![
("$-xgafv", "$.xgafv"),
("access-token", "access_token"),
("oauth-token", "oauth_token"),
("pretty-print", "prettyPrint"),
("quota-user", "quotaUser"),
("user-ip", "userIp"),
("upload-type", "uploadType"),
("upload-protocol", "upload_protocol"),
]
};
@@ -1113,22 +1116,48 @@ fn main() {
let arg_data = [
("users", "methods: 'data-sources-create', 'data-sources-data-point-changes-list', 'data-sources-datasets-delete', 'data-sources-datasets-get', 'data-sources-datasets-patch', 'data-sources-delete', 'data-sources-get', 'data-sources-list', 'data-sources-update', 'dataset-aggregate', 'sessions-delete', 'sessions-list' and 'sessions-update'", vec![
("data-sources-create",
Some(r##"Creates a new data source that is unique across all data sources belonging to this user.
Some(r##"Creates a new data source that is unique across all data sources belonging
to this user.
A data source is a unique source of sensor data. Data sources can expose raw data coming from hardware sensors on local or companion devices. They can also expose derived data, created by transforming or merging other data sources. Multiple data sources can exist for the same data type. Every data point in every dataset inserted into or read from the Fitness API has an associated data source.
A data source is a unique source of sensor data. Data sources can expose
raw data coming from hardware sensors on local or companion devices. They
can also expose derived data, created by transforming or merging other data
sources. Multiple data sources can exist for the same data type. Every data
point in every dataset inserted into or read from the Fitness API has an
associated data source.
Each data source produces a unique stream of dataset updates, with a unique data source identifier. Not all changes to data source affect the data stream ID, so that data collected by updated versions of the same application/device can still be considered to belong to the same data source.
Each data source produces a unique stream of dataset updates, with a
unique data source identifier. Not all changes to data source affect the
data stream ID, so that data collected by updated versions of the same
application/device can still be considered to belong to the same data
source.
Data sources are identified using a string generated by the server, based on the contents of the source being created. The dataStreamId field should not be set when invoking this method. It will be automatically generated by the server with the correct format. If a dataStreamId is set, it must match the format that the server would generate. This format is a combination of some fields from the data source, and has a specific order. If it doesn't match, the request will fail with an error.
Data sources are identified using a string generated by the server, based
on the contents of the source being created. The <code>dataStreamId</code>
field should not be set when invoking this method. It
will be automatically generated by the server with the correct format. If
a <code>dataStreamId</code> is set, it must match the format that the
server would generate. This format is a combination of some fields from the
data source, and has a specific order. If it doesn't match, the request
will fail with an error.
Specifying a DataType which is not a known type (beginning with "com.google.") will create a DataSource with a custom data type. Custom data types are only readable by the application that created them. Custom data types are deprecated; use standard data types instead.
Specifying a DataType which is not a known type (beginning with
"com.google.") will create a DataSource with a <em>custom data type</em>.
Custom data types are only readable by the application that created them.
Custom data types are <strong>deprecated</strong>; use standard data types
instead.
In addition to the data source fields included in the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types."##),
In addition to the data source fields included in the data source ID, the
developer project number that is authenticated when creating the data
source is included. This developer project number is obfuscated when read
by any other developer reading public data types."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_data-sources-create",
vec![
(Some(r##"user-id"##),
None,
Some(r##"Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Create the data source for the person identified. Use <code>me</code> to
indicate the authenticated user. Only <code>me</code> is supported at this
time."##),
Some(true),
Some(false)),
@@ -1156,7 +1185,8 @@ fn main() {
vec![
(Some(r##"user-id"##),
None,
Some(r##"List data points for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"List data points for the person identified. Use <code>me</code> to indicate
the authenticated user. Only <code>me</code> is supported at this time."##),
Some(true),
Some(false)),
@@ -1179,12 +1209,19 @@ fn main() {
Some(false)),
]),
("data-sources-datasets-delete",
Some(r##"Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted."##),
Some(r##"Performs an inclusive delete of all data points whose start and end times
have any overlap with the time range specified by the dataset ID. For most
data types, the entire data point will be deleted. For data types where the
time span represents a consistent value (such as
<code>com.google.activity.segment</code>), and a data point straddles
either end point of the dataset, only the overlapping portion of the data
point will be deleted."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_data-sources-datasets-delete",
vec![
(Some(r##"user-id"##),
None,
Some(r##"Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Delete a dataset for the person identified. Use <code>me</code> to indicate
the authenticated user. Only <code>me</code> is supported at this time."##),
Some(true),
Some(false)),
@@ -1196,7 +1233,10 @@ fn main() {
(Some(r##"dataset-id"##),
None,
Some(r##"Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers."##),
Some(r##"Dataset identifier that is a composite of the minimum data point start time
and maximum data point end time represented as nanoseconds from the epoch.
The ID is formatted like: "<var>startTime</var>-<var>endTime</var>"
where <var>startTime</var> and <var>endTime</var> are 64 bit integers."##),
Some(true),
Some(false)),
@@ -1207,12 +1247,18 @@ fn main() {
Some(true)),
]),
("data-sources-datasets-get",
Some(r##"Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time."##),
Some(r##"Returns a dataset containing all data points whose start and end times
overlap with the specified range of the dataset minimum start time and
maximum end time. Specifically, any data point whose start time is less
than or equal to the dataset end time and whose end time is greater than or
equal to the dataset start time."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_data-sources-datasets-get",
vec![
(Some(r##"user-id"##),
None,
Some(r##"Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Retrieve a dataset for the person identified. Use <code>me</code> to
indicate the authenticated user. Only <code>me</code> is supported at this
time."##),
Some(true),
Some(false)),
@@ -1224,7 +1270,10 @@ fn main() {
(Some(r##"dataset-id"##),
None,
Some(r##"Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers."##),
Some(r##"Dataset identifier that is a composite of the minimum data point start time
and maximum data point end time represented as nanoseconds from the epoch.
The ID is formatted like: "<var>startTime</var>-<var>endTime</var>"
where <var>startTime</var> and <var>endTime</var> are 64 bit integers."##),
Some(true),
Some(false)),
@@ -1241,12 +1290,16 @@ fn main() {
Some(false)),
]),
("data-sources-datasets-patch",
Some(r##"Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics."##),
Some(r##"Adds data points to a dataset. The dataset need not be previously created.
All points within the given dataset will be returned with subsquent calls
to retrieve this dataset. Data points can belong to more than one dataset.
This method does not use patch semantics."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_data-sources-datasets-patch",
vec![
(Some(r##"user-id"##),
None,
Some(r##"Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Patch a dataset for the person identified. Use <code>me</code> to indicate
the authenticated user. Only <code>me</code> is supported at this time."##),
Some(true),
Some(false)),
@@ -1258,7 +1311,10 @@ fn main() {
(Some(r##"dataset-id"##),
None,
Some(r##"Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers."##),
Some(r##"Dataset identifier that is a composite of the minimum data point start time
and maximum data point end time represented as nanoseconds from the epoch.
The ID is formatted like: "<var>startTime</var>-<var>endTime</var>"
where <var>startTime</var> and <var>endTime</var> are 64 bit integers."##),
Some(true),
Some(false)),
@@ -1281,12 +1337,15 @@ fn main() {
Some(false)),
]),
("data-sources-delete",
Some(r##"Deletes the specified data source. The request will fail if the data source contains any data points."##),
Some(r##"Deletes the specified data source. The request will fail if the data
source contains any data points."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_data-sources-delete",
vec![
(Some(r##"user-id"##),
None,
Some(r##"Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Retrieve a data source for the person identified. Use <code>me</code> to
indicate the authenticated user. Only <code>me</code> is supported at this
time."##),
Some(true),
Some(false)),
@@ -1314,7 +1373,9 @@ fn main() {
vec![
(Some(r##"user-id"##),
None,
Some(r##"Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Retrieve a data source for the person identified. Use <code>me</code> to
indicate the authenticated user. Only <code>me</code> is supported at this
time."##),
Some(true),
Some(false)),
@@ -1337,12 +1398,17 @@ fn main() {
Some(false)),
]),
("data-sources-list",
Some(r##"Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive; the user may have private data sources that are only visible to other developers, or calls using other scopes."##),
Some(r##"Lists all data sources that are visible to the developer, using the OAuth
scopes provided. The list is not exhaustive; the user may have private
data sources that are only visible to other developers, or calls using
other scopes."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_data-sources-list",
vec![
(Some(r##"user-id"##),
None,
Some(r##"List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"List data sources for the person identified. Use <code>me</code> to
indicate the authenticated user. Only <code>me</code> is supported at this
time."##),
Some(true),
Some(false)),
@@ -1359,14 +1425,19 @@ fn main() {
Some(false)),
]),
("data-sources-update",
Some(r##"Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified.
Some(r##"Updates the specified data source. The <code>dataStreamId</code>,
<code>dataType</code>, <code>type</code>, <code>dataStreamName</code>, and
<code>device</code> properties with the exception of <code>version</code>,
cannot be modified.
Data sources are identified by their dataStreamId."##),
Data sources are identified by their <code>dataStreamId</code>."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_data-sources-update",
vec![
(Some(r##"user-id"##),
None,
Some(r##"Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Update the data source for the person identified. Use <code>me</code> to
indicate the authenticated user. Only <code>me</code> is supported at this
time."##),
Some(true),
Some(false)),
@@ -1395,12 +1466,15 @@ fn main() {
Some(false)),
]),
("dataset-aggregate",
Some(r##"Aggregates data of a certain type or stream into buckets divided by a given type of boundary. Multiple data sets of multiple types and from multiple sources can be aggregated into exactly one bucket type per request."##),
Some(r##"Aggregates data of a certain type or stream into buckets divided by a given
type of boundary. Multiple data sets of multiple types and from multiple
sources can be aggregated into exactly one bucket type per request."##),
"Details at http://byron.github.io/google-apis-rs/google_fitness1_cli/users_dataset-aggregate",
vec![
(Some(r##"user-id"##),
None,
Some(r##"Aggregate data for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Aggregate data for the person identified. Use <code>me</code> to indicate
the authenticated user. Only <code>me</code> is supported at this time."##),
Some(true),
Some(false)),
@@ -1428,7 +1502,8 @@ fn main() {
vec![
(Some(r##"user-id"##),
None,
Some(r##"Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Delete a session for the person identified. Use <code>me</code> to indicate
the authenticated user. Only <code>me</code> is supported at this time."##),
Some(true),
Some(false)),
@@ -1450,7 +1525,8 @@ fn main() {
vec![
(Some(r##"user-id"##),
None,
Some(r##"List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"List sessions for the person identified. Use <code>me</code> to indicate
the authenticated user. Only <code>me</code> is supported at this time."##),
Some(true),
Some(false)),
@@ -1472,7 +1548,8 @@ fn main() {
vec![
(Some(r##"user-id"##),
None,
Some(r##"Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time."##),
Some(r##"Create sessions for the person identified. Use <code>me</code> to indicate
the authenticated user. Only <code>me</code> is supported at this time."##),
Some(true),
Some(false)),
@@ -1506,8 +1583,8 @@ fn main() {
let mut app = App::new("fitness1")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("1.0.13+20200407")
.about("Stores and accesses user data in the fitness store from apps on any platform.")
.version("1.0.14+20200707")
.about("The Fitness API for managing users' fitness tracking data.")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_fitness1_cli")
.arg(Arg::with_name("url")
.long("scope")