blob: 1f397a2b43a8167d64afd8c60091180db400fab9 [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070075<h1><a href="fitness_v1.html">Fitness API</a> . <a href="fitness_v1.users.html">users</a> . <a href="fitness_v1.users.dataSources.html">dataSources</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="fitness_v1.users.dataSources.dataPointChanges.html">dataPointChanges()</a></code>
79</p>
80<p class="firstline">Returns the dataPointChanges Resource.</p>
81
82<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -080083 <code><a href="fitness_v1.users.dataSources.datasets.html">datasets()</a></code>
84</p>
85<p class="firstline">Returns the datasets Resource.</p>
86
87<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088 <code><a href="#close">close()</a></code></p>
89<p class="firstline">Close httplib2 connections.</p>
90<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070091 <code><a href="#create">create(userId, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070092<p class="firstline">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. 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. 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. 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.</p>
Craig Citroe633be12015-03-02 13:40:36 -080093<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070094 <code><a href="#delete">delete(userId, dataSourceId, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070095<p class="firstline">Deletes the specified data source. The request will fail if the data source contains any data points.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000096<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070097 <code><a href="#get">get(userId, dataSourceId, x__xgafv=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070098<p class="firstline">Returns the specified data source.</p>
Craig Citroe633be12015-03-02 13:40:36 -080099<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700100 <code><a href="#list">list(userId, dataTypeName=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700101<p class="firstline">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.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800102<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700103 <code><a href="#update">update(userId, dataSourceId, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700104<p class="firstline">Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified. Data sources are identified by their dataStreamId.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800105<h3>Method Details</h3>
106<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700107 <code class="details" id="close">close()</code>
108 <pre>Close httplib2 connections.</pre>
109</div>
110
111<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700112 <code class="details" id="create">create(userId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700113 <pre>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. 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&#x27;t match, the request will fail with an error. Specifying a DataType which is not a known type (beginning with &quot;com.google.&quot;) 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. 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.
Craig Citroe633be12015-03-02 13:40:36 -0800114
115Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700116 userId: string, Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800118 The object takes the form of:
119
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120{ # Definition of 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 inserted into or read from this service has an associated data source. The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type. Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800121 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
122 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
123 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
124 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
125 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
126 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800127 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
128 &quot;A String&quot;,
129 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800130 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device&#x27;s manufacturer, model, and serial number (UID). - The application&#x27;s package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source&#x27;s type. - The data source&#x27;s stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn&#x27;t used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they&#x27;re not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
131 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800132 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
133 &quot;field&quot;: [ # A field represents one dimension of a data type.
134 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.). This message is only instantiated in code and not used for wire comms or stored in any way.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800135 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800136 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.
137 &quot;optional&quot;: True or False,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800138 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700139 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800140 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.
141 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800142 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version. # Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
143 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
144 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
145 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
146 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
147 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
148 },
149 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
150 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800151}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700153 x__xgafv: string, V1 error format.
154 Allowed values
155 1 - v1 error format
156 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157
158Returns:
159 An object of the form:
160
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700161 { # Definition of 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 inserted into or read from this service has an associated data source. The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type. Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800162 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
163 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
164 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
165 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
166 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
167 },
168 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
169 &quot;A String&quot;,
170 ],
171 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device&#x27;s manufacturer, model, and serial number (UID). - The application&#x27;s package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source&#x27;s type. - The data source&#x27;s stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn&#x27;t used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they&#x27;re not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
172 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
173 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
174 &quot;field&quot;: [ # A field represents one dimension of a data type.
175 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.). This message is only instantiated in code and not used for wire comms or stored in any way.
176 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
177 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.
178 &quot;optional&quot;: True or False,
179 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800180 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800181 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.
182 },
183 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version. # Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
184 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
185 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
186 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
187 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
188 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
189 },
190 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
191 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
192}</pre>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000193</div>
Craig Citroe633be12015-03-02 13:40:36 -0800194
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000195<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700196 <code class="details" id="delete">delete(userId, dataSourceId, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700197 <pre>Deletes the specified data source. The request will fail if the data source contains any data points.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000198
199Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700200 userId: string, Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000201 dataSourceId: string, The data stream ID of the data source to delete. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700202 x__xgafv: string, V1 error format.
203 Allowed values
204 1 - v1 error format
205 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800206
207Returns:
208 An object of the form:
209
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700210 { # Definition of 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 inserted into or read from this service has an associated data source. The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type. Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800211 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
212 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
213 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
214 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
215 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
216 },
217 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
218 &quot;A String&quot;,
219 ],
220 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device&#x27;s manufacturer, model, and serial number (UID). - The application&#x27;s package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source&#x27;s type. - The data source&#x27;s stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn&#x27;t used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they&#x27;re not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
221 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
222 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
223 &quot;field&quot;: [ # A field represents one dimension of a data type.
224 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.). This message is only instantiated in code and not used for wire comms or stored in any way.
225 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
226 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.
227 &quot;optional&quot;: True or False,
228 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800229 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800230 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.
231 },
232 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version. # Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
233 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
234 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
235 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
236 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
237 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
238 },
239 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
240 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
241}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800242</div>
243
244<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700245 <code class="details" id="get">get(userId, dataSourceId, x__xgafv=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700246 <pre>Returns the specified data source.
Craig Citroe633be12015-03-02 13:40:36 -0800247
248Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700249 userId: string, Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800250 dataSourceId: string, The data stream ID of the data source to retrieve. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700251 x__xgafv: string, V1 error format.
252 Allowed values
253 1 - v1 error format
254 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800255
256Returns:
257 An object of the form:
258
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700259 { # Definition of 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 inserted into or read from this service has an associated data source. The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type. Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800260 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
261 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
262 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
263 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
264 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
265 },
266 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
267 &quot;A String&quot;,
268 ],
269 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device&#x27;s manufacturer, model, and serial number (UID). - The application&#x27;s package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source&#x27;s type. - The data source&#x27;s stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn&#x27;t used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they&#x27;re not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
270 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
271 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
272 &quot;field&quot;: [ # A field represents one dimension of a data type.
273 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.). This message is only instantiated in code and not used for wire comms or stored in any way.
274 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
275 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.
276 &quot;optional&quot;: True or False,
277 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800278 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800279 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.
280 },
281 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version. # Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
282 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
283 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
284 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
285 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
286 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
287 },
288 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
289 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
290}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800291</div>
292
293<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700294 <code class="details" id="list">list(userId, dataTypeName=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700295 <pre>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.
Craig Citroe633be12015-03-02 13:40:36 -0800296
297Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700298 userId: string, List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
299 dataTypeName: string, The names of data types to include in the list. If not specified, all data sources will be returned. (repeated)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700300 x__xgafv: string, V1 error format.
301 Allowed values
302 1 - v1 error format
303 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800304
305Returns:
306 An object of the form:
307
308 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800309 &quot;dataSource&quot;: [ # A previously created data source.
310 { # Definition of 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 inserted into or read from this service has an associated data source. The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type. Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
311 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
312 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
313 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
314 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
315 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800316 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800317 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
318 &quot;A String&quot;,
319 ],
320 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device&#x27;s manufacturer, model, and serial number (UID). - The application&#x27;s package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source&#x27;s type. - The data source&#x27;s stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn&#x27;t used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they&#x27;re not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
321 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
322 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
323 &quot;field&quot;: [ # A field represents one dimension of a data type.
324 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.). This message is only instantiated in code and not used for wire comms or stored in any way.
325 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
326 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.
327 &quot;optional&quot;: True or False,
328 },
329 ],
330 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.
331 },
332 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version. # Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
333 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
334 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
335 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
336 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
337 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
338 },
339 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
340 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
341 },
342 ],
343}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800344</div>
345
346<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700347 <code class="details" id="update">update(userId, dataSourceId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700348 <pre>Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified. Data sources are identified by their dataStreamId.
Craig Citroe633be12015-03-02 13:40:36 -0800349
350Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 userId: string, Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800352 dataSourceId: string, The data stream ID of the data source to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700353 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800354 The object takes the form of:
355
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700356{ # Definition of 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 inserted into or read from this service has an associated data source. The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type. Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800357 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
358 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
359 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
360 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
361 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
362 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800363 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
364 &quot;A String&quot;,
365 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800366 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device&#x27;s manufacturer, model, and serial number (UID). - The application&#x27;s package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source&#x27;s type. - The data source&#x27;s stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn&#x27;t used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they&#x27;re not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
367 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800368 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
369 &quot;field&quot;: [ # A field represents one dimension of a data type.
370 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.). This message is only instantiated in code and not used for wire comms or stored in any way.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800371 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800372 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.
373 &quot;optional&quot;: True or False,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800374 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700375 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800376 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.
377 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800378 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version. # Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
379 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
380 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
381 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
382 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
383 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
384 },
385 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
386 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800387}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700389 x__xgafv: string, V1 error format.
390 Allowed values
391 1 - v1 error format
392 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393
394Returns:
395 An object of the form:
396
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700397 { # Definition of 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 inserted into or read from this service has an associated data source. The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type. Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800398 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
399 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
400 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
401 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
402 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
403 },
404 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
405 &quot;A String&quot;,
406 ],
407 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device&#x27;s manufacturer, model, and serial number (UID). - The application&#x27;s package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source&#x27;s type. - The data source&#x27;s stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn&#x27;t used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they&#x27;re not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
408 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
409 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
410 &quot;field&quot;: [ # A field represents one dimension of a data type.
411 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.). This message is only instantiated in code and not used for wire comms or stored in any way.
412 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
413 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.
414 &quot;optional&quot;: True or False,
415 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800416 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800417 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.
418 },
419 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version. # Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
420 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
421 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
422 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
423 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
424 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
425 },
426 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
427 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
428}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800429</div>
430
431</body></html>