Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 75 | <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 Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 78 | <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 Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 83 | <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"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 88 | <code><a href="#create">create(userId, body=None, x__xgafv=None)</a></code></p> |
| 89 | <p class="firstline">Creates a new data source that is unique across all data sources belonging</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 90 | <p class="toc_element"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 91 | <code><a href="#delete">delete(userId, dataSourceId, x__xgafv=None)</a></code></p> |
| 92 | <p class="firstline">Deletes the specified data source. The request will fail if the data</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 93 | <p class="toc_element"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 94 | <code><a href="#get">get(userId, dataSourceId, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 95 | <p class="firstline">Returns the specified data source.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 96 | <p class="toc_element"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 97 | <code><a href="#list">list(userId, dataTypeName=None, x__xgafv=None)</a></code></p> |
| 98 | <p class="firstline">Lists all data sources that are visible to the developer, using the OAuth</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 99 | <p class="toc_element"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 100 | <code><a href="#update">update(userId, dataSourceId, body=None, x__xgafv=None)</a></code></p> |
| 101 | <p class="firstline">Updates the specified data source. The <code>dataStreamId</code>,</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 102 | <h3>Method Details</h3> |
| 103 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 104 | <code class="details" id="create">create(userId, body=None, x__xgafv=None)</code> |
| 105 | <pre>Creates a new data source that is unique across all data sources belonging |
| 106 | to this user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 107 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 108 | A data source is a unique source of sensor data. Data sources can expose |
| 109 | raw data coming from hardware sensors on local or companion devices. They |
| 110 | can also expose derived data, created by transforming or merging other data |
| 111 | sources. Multiple data sources can exist for the same data type. Every data |
| 112 | point in every dataset inserted into or read from the Fitness API has an |
| 113 | associated data source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 114 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 115 | Each data source produces a unique stream of dataset updates, with a |
| 116 | unique data source identifier. Not all changes to data source affect the |
| 117 | data stream ID, so that data collected by updated versions of the same |
| 118 | application/device can still be considered to belong to the same data |
| 119 | source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 120 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 121 | Data sources are identified using a string generated by the server, based |
| 122 | on the contents of the source being created. The <code>dataStreamId</code> |
| 123 | field should not be set when invoking this method. It |
| 124 | will be automatically generated by the server with the correct format. If |
| 125 | a <code>dataStreamId</code> is set, it must match the format that the |
| 126 | server would generate. This format is a combination of some fields from the |
| 127 | data source, and has a specific order. If it doesn't match, the request |
| 128 | will fail with an error. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 129 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 130 | Specifying a DataType which is not a known type (beginning with |
| 131 | "com.google.") will create a DataSource with a <em>custom data type</em>. |
| 132 | Custom data types are only readable by the application that created them. |
| 133 | Custom data types are <strong>deprecated</strong>; use standard data types |
| 134 | instead. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 135 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 136 | In addition to the data source fields included in the data source ID, the |
| 137 | developer project number that is authenticated when creating the data |
| 138 | source is included. This developer project number is obfuscated when read |
| 139 | by any other developer reading public data types. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 140 | |
| 141 | Args: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 142 | userId: string, Create the data source for the person identified. Use <code>me</code> to |
| 143 | indicate the authenticated user. Only <code>me</code> is supported at this |
| 144 | time. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 145 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 146 | The object takes the form of: |
| 147 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 148 | { # Definition of a unique source of sensor data. Data sources can expose raw |
| 149 | # data coming from hardware sensors on local or companion devices. They can |
| 150 | # also expose derived data, created by transforming or merging other data |
| 151 | # sources. Multiple data sources can exist for the same data type. Every data |
| 152 | # point inserted into or read from this service has an associated data |
| 153 | # source. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 154 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 155 | # The data source contains enough information to uniquely identify its data, |
| 156 | # including the hardware device and the application that collected and/or |
| 157 | # transformed the data. It also holds useful metadata, such as the hardware and |
| 158 | # application versions, and the device type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 159 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 160 | # Each data source produces a unique stream of data, with a unique identifier. |
| 161 | # Not all changes to data source affect the stream identifier, so that data |
| 162 | # collected by updated versions of the same application/device can still be |
| 163 | # considered to belong to the same data stream. |
| 164 | "device": { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that |
| 165 | # can hold sensors. |
| 166 | # can hold sensors. Each sensor is exposed as a data source. |
| 167 | # |
| 168 | # The main purpose of the device information contained in this class is to |
| 169 | # identify the hardware of a particular data source. This can be useful in |
| 170 | # different ways, including: |
| 171 | # <ul> |
| 172 | # <li>Distinguishing two similar sensors on different devices (the step |
| 173 | # counter on two nexus 5 phones, for instance) |
| 174 | # <li>Display the source of data to the user (by using the device make / |
| 175 | # model) |
| 176 | # <li>Treat data differently depending on sensor type (accelerometers on a |
| 177 | # watch may give different patterns than those on a phone) |
| 178 | # <li>Build different analysis models for each device/version. |
| 179 | # </ul> |
| 180 | "manufacturer": "A String", # Manufacturer of the product/hardware. |
| 181 | "type": "A String", # A constant representing the type of the device. |
| 182 | "uid": "A String", # The serial number or other unique ID for the hardware. This field is |
| 183 | # obfuscated when read by any REST or Android client that did not create |
| 184 | # the data source. Only the data source creator will see the uid field in |
| 185 | # clear and normal form. |
| 186 | # |
| 187 | # The obfuscation preserves equality; that is, given two IDs, if id1 == id2, |
| 188 | # obfuscated(id1) == obfuscated(id2). |
| 189 | "model": "A String", # End-user visible model name for the device. |
| 190 | "version": "A String", # Version string for the device hardware/software. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 191 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 192 | "dataType": { # The data type defines the schema for a stream of data being collected by, |
| 193 | # inserted into, or queried from the Fitness API. |
| 194 | "name": "A String", # Each data type has a unique, namespaced, name. All data types in the |
| 195 | # com.google namespace are shared as part of the platform. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 196 | "field": [ # A field represents one dimension of a data type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 197 | { # In case of multi-dimensional data (such as an accelerometer with x, y, and z |
| 198 | # axes) each field represents one dimension. Each data type field has a unique |
| 199 | # name which identifies it. The field also defines the format of the data (int, |
| 200 | # float, etc.). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 201 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 202 | # This message is only instantiated in code and not used for wire comms or |
| 203 | # stored in any way. |
| 204 | "name": "A String", # Defines the name and format of data. Unlike data type names, field names |
| 205 | # are not namespaced, and only need to be unique within the data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 206 | "format": "A String", # The different supported formats for each field in a data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 207 | "optional": True or False, |
| 208 | }, |
| 209 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 210 | }, |
| 211 | "name": "A String", # An end-user visible name for this data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 212 | "dataStreamId": "A String", # A unique identifier for the data stream produced by this data source. The |
| 213 | # identifier includes:<br/><br/> |
| 214 | # <ul> |
| 215 | # <li>The physical device's manufacturer, model, and serial number |
| 216 | # (UID).</li> |
| 217 | # <li>The application's package name or name. Package name is used when the |
| 218 | # data source was created by an Android application. The developer project |
| 219 | # number is used when the data source was created by a REST client.</li> |
| 220 | # <li>The data source's type.</li> |
| 221 | # <li>The data source's stream name.</li> |
| 222 | # </ul> |
| 223 | # Note that not all attributes of the data source are used as part of the |
| 224 | # stream identifier. In particular, the version of the hardware/the |
| 225 | # application isn't used. This allows us to preserve the same stream through |
| 226 | # version updates. This also means that two DataSource objects may represent |
| 227 | # the same data stream even if they're not equal. |
| 228 | # |
| 229 | # The exact format of the data stream ID created by an Android application |
| 230 | # is: |
| 231 | # <var>type:dataType.name<wbr/>:application.packageName<wbr/>:device.manufacturer<wbr/>:device.model<wbr/>:device.uid<wbr/>:dataStreamName</var> |
| 232 | # |
| 233 | # The exact format of the data stream ID created by a REST client is: |
| 234 | # <var>type:dataType.name<wbr/>:developer project |
| 235 | # number<wbr/>:device.manufacturer<wbr/>:device.model:device.uid<wbr/>:dataStreamName</var> |
| 236 | # |
| 237 | # When any of the optional fields that make up the data stream ID are absent, |
| 238 | # they will be omitted from the data stream ID. The minimum viable data |
| 239 | # stream ID would be: |
| 240 | # type:dataType.name:developer project number |
| 241 | # |
| 242 | # Finally, the developer project number and device UID are obfuscated when |
| 243 | # read by any REST or Android client that did not create the data source. |
| 244 | # Only the data source creator will see the developer project number in clear |
| 245 | # and normal form. This means a client will see a different set of |
| 246 | # data_stream_ids than another client with different credentials. |
| 247 | "type": "A String", # A constant describing the type of this data source. Indicates whether this |
| 248 | # data source produces raw or derived data. |
| 249 | "dataQualityStandard": [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the |
| 250 | # platform, and is ignored in queries. It will be removed in a future version |
| 251 | # entirely. |
| 252 | "A String", |
| 253 | ], |
| 254 | "dataStreamName": "A String", # The stream name uniquely identifies this particular data source among |
| 255 | # other data sources of the same type from the same underlying producer. |
| 256 | # Setting the stream name is optional, but should be done whenever an |
| 257 | # application exposes two streams for the same data type, or when a device |
| 258 | # has two equivalent sensors. |
| 259 | "application": { # Information about an application which feeds sensor data into the platform. |
| 260 | "packageName": "A String", # Package name for this application. This is used as a unique |
| 261 | # identifier when created by Android applications, but cannot be specified |
| 262 | # by REST clients. REST clients will have their developer project number |
| 263 | # reflected into the Data Source data stream IDs, instead of the packageName. |
| 264 | "name": "A String", # The name of this application. This is required for REST clients, but we |
| 265 | # do not enforce uniqueness of this name. It is provided as a matter of |
| 266 | # convenience for other developers who would like to identify which REST |
| 267 | # created an Application or Data Source. |
| 268 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 269 | "version": "A String", # Version of the application. You should update this field whenever the |
| 270 | # application changes in a way that affects the computation of the data. |
| 271 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 272 | } |
| 273 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 274 | x__xgafv: string, V1 error format. |
| 275 | Allowed values |
| 276 | 1 - v1 error format |
| 277 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 278 | |
| 279 | Returns: |
| 280 | An object of the form: |
| 281 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 282 | { # Definition of a unique source of sensor data. Data sources can expose raw |
| 283 | # data coming from hardware sensors on local or companion devices. They can |
| 284 | # also expose derived data, created by transforming or merging other data |
| 285 | # sources. Multiple data sources can exist for the same data type. Every data |
| 286 | # point inserted into or read from this service has an associated data |
| 287 | # source. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 288 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 289 | # The data source contains enough information to uniquely identify its data, |
| 290 | # including the hardware device and the application that collected and/or |
| 291 | # transformed the data. It also holds useful metadata, such as the hardware and |
| 292 | # application versions, and the device type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 293 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 294 | # Each data source produces a unique stream of data, with a unique identifier. |
| 295 | # Not all changes to data source affect the stream identifier, so that data |
| 296 | # collected by updated versions of the same application/device can still be |
| 297 | # considered to belong to the same data stream. |
| 298 | "device": { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that |
| 299 | # can hold sensors. |
| 300 | # can hold sensors. Each sensor is exposed as a data source. |
| 301 | # |
| 302 | # The main purpose of the device information contained in this class is to |
| 303 | # identify the hardware of a particular data source. This can be useful in |
| 304 | # different ways, including: |
| 305 | # <ul> |
| 306 | # <li>Distinguishing two similar sensors on different devices (the step |
| 307 | # counter on two nexus 5 phones, for instance) |
| 308 | # <li>Display the source of data to the user (by using the device make / |
| 309 | # model) |
| 310 | # <li>Treat data differently depending on sensor type (accelerometers on a |
| 311 | # watch may give different patterns than those on a phone) |
| 312 | # <li>Build different analysis models for each device/version. |
| 313 | # </ul> |
| 314 | "manufacturer": "A String", # Manufacturer of the product/hardware. |
| 315 | "type": "A String", # A constant representing the type of the device. |
| 316 | "uid": "A String", # The serial number or other unique ID for the hardware. This field is |
| 317 | # obfuscated when read by any REST or Android client that did not create |
| 318 | # the data source. Only the data source creator will see the uid field in |
| 319 | # clear and normal form. |
| 320 | # |
| 321 | # The obfuscation preserves equality; that is, given two IDs, if id1 == id2, |
| 322 | # obfuscated(id1) == obfuscated(id2). |
| 323 | "model": "A String", # End-user visible model name for the device. |
| 324 | "version": "A String", # Version string for the device hardware/software. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 325 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 326 | "dataType": { # The data type defines the schema for a stream of data being collected by, |
| 327 | # inserted into, or queried from the Fitness API. |
| 328 | "name": "A String", # Each data type has a unique, namespaced, name. All data types in the |
| 329 | # com.google namespace are shared as part of the platform. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 330 | "field": [ # A field represents one dimension of a data type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 331 | { # In case of multi-dimensional data (such as an accelerometer with x, y, and z |
| 332 | # axes) each field represents one dimension. Each data type field has a unique |
| 333 | # name which identifies it. The field also defines the format of the data (int, |
| 334 | # float, etc.). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 335 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 336 | # This message is only instantiated in code and not used for wire comms or |
| 337 | # stored in any way. |
| 338 | "name": "A String", # Defines the name and format of data. Unlike data type names, field names |
| 339 | # are not namespaced, and only need to be unique within the data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 340 | "format": "A String", # The different supported formats for each field in a data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 341 | "optional": True or False, |
| 342 | }, |
| 343 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 344 | }, |
| 345 | "name": "A String", # An end-user visible name for this data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 346 | "dataStreamId": "A String", # A unique identifier for the data stream produced by this data source. The |
| 347 | # identifier includes:<br/><br/> |
| 348 | # <ul> |
| 349 | # <li>The physical device's manufacturer, model, and serial number |
| 350 | # (UID).</li> |
| 351 | # <li>The application's package name or name. Package name is used when the |
| 352 | # data source was created by an Android application. The developer project |
| 353 | # number is used when the data source was created by a REST client.</li> |
| 354 | # <li>The data source's type.</li> |
| 355 | # <li>The data source's stream name.</li> |
| 356 | # </ul> |
| 357 | # Note that not all attributes of the data source are used as part of the |
| 358 | # stream identifier. In particular, the version of the hardware/the |
| 359 | # application isn't used. This allows us to preserve the same stream through |
| 360 | # version updates. This also means that two DataSource objects may represent |
| 361 | # the same data stream even if they're not equal. |
| 362 | # |
| 363 | # The exact format of the data stream ID created by an Android application |
| 364 | # is: |
| 365 | # <var>type:dataType.name<wbr/>:application.packageName<wbr/>:device.manufacturer<wbr/>:device.model<wbr/>:device.uid<wbr/>:dataStreamName</var> |
| 366 | # |
| 367 | # The exact format of the data stream ID created by a REST client is: |
| 368 | # <var>type:dataType.name<wbr/>:developer project |
| 369 | # number<wbr/>:device.manufacturer<wbr/>:device.model:device.uid<wbr/>:dataStreamName</var> |
| 370 | # |
| 371 | # When any of the optional fields that make up the data stream ID are absent, |
| 372 | # they will be omitted from the data stream ID. The minimum viable data |
| 373 | # stream ID would be: |
| 374 | # type:dataType.name:developer project number |
| 375 | # |
| 376 | # Finally, the developer project number and device UID are obfuscated when |
| 377 | # read by any REST or Android client that did not create the data source. |
| 378 | # Only the data source creator will see the developer project number in clear |
| 379 | # and normal form. This means a client will see a different set of |
| 380 | # data_stream_ids than another client with different credentials. |
| 381 | "type": "A String", # A constant describing the type of this data source. Indicates whether this |
| 382 | # data source produces raw or derived data. |
| 383 | "dataQualityStandard": [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the |
| 384 | # platform, and is ignored in queries. It will be removed in a future version |
| 385 | # entirely. |
| 386 | "A String", |
| 387 | ], |
| 388 | "dataStreamName": "A String", # The stream name uniquely identifies this particular data source among |
| 389 | # other data sources of the same type from the same underlying producer. |
| 390 | # Setting the stream name is optional, but should be done whenever an |
| 391 | # application exposes two streams for the same data type, or when a device |
| 392 | # has two equivalent sensors. |
| 393 | "application": { # Information about an application which feeds sensor data into the platform. |
| 394 | "packageName": "A String", # Package name for this application. This is used as a unique |
| 395 | # identifier when created by Android applications, but cannot be specified |
| 396 | # by REST clients. REST clients will have their developer project number |
| 397 | # reflected into the Data Source data stream IDs, instead of the packageName. |
| 398 | "name": "A String", # The name of this application. This is required for REST clients, but we |
| 399 | # do not enforce uniqueness of this name. It is provided as a matter of |
| 400 | # convenience for other developers who would like to identify which REST |
| 401 | # created an Application or Data Source. |
| 402 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 403 | "version": "A String", # Version of the application. You should update this field whenever the |
| 404 | # application changes in a way that affects the computation of the data. |
| 405 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 406 | }</pre> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 407 | </div> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 408 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 409 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 410 | <code class="details" id="delete">delete(userId, dataSourceId, x__xgafv=None)</code> |
| 411 | <pre>Deletes the specified data source. The request will fail if the data |
| 412 | source contains any data points. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 413 | |
| 414 | Args: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 415 | userId: string, Retrieve a data source for the person identified. Use <code>me</code> to |
| 416 | indicate the authenticated user. Only <code>me</code> is supported at this |
| 417 | time. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 418 | dataSourceId: string, The data stream ID of the data source to delete. (required) |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 419 | x__xgafv: string, V1 error format. |
| 420 | Allowed values |
| 421 | 1 - v1 error format |
| 422 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 423 | |
| 424 | Returns: |
| 425 | An object of the form: |
| 426 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 427 | { # Definition of a unique source of sensor data. Data sources can expose raw |
| 428 | # data coming from hardware sensors on local or companion devices. They can |
| 429 | # also expose derived data, created by transforming or merging other data |
| 430 | # sources. Multiple data sources can exist for the same data type. Every data |
| 431 | # point inserted into or read from this service has an associated data |
| 432 | # source. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 433 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 434 | # The data source contains enough information to uniquely identify its data, |
| 435 | # including the hardware device and the application that collected and/or |
| 436 | # transformed the data. It also holds useful metadata, such as the hardware and |
| 437 | # application versions, and the device type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 438 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 439 | # Each data source produces a unique stream of data, with a unique identifier. |
| 440 | # Not all changes to data source affect the stream identifier, so that data |
| 441 | # collected by updated versions of the same application/device can still be |
| 442 | # considered to belong to the same data stream. |
| 443 | "device": { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that |
| 444 | # can hold sensors. |
| 445 | # can hold sensors. Each sensor is exposed as a data source. |
| 446 | # |
| 447 | # The main purpose of the device information contained in this class is to |
| 448 | # identify the hardware of a particular data source. This can be useful in |
| 449 | # different ways, including: |
| 450 | # <ul> |
| 451 | # <li>Distinguishing two similar sensors on different devices (the step |
| 452 | # counter on two nexus 5 phones, for instance) |
| 453 | # <li>Display the source of data to the user (by using the device make / |
| 454 | # model) |
| 455 | # <li>Treat data differently depending on sensor type (accelerometers on a |
| 456 | # watch may give different patterns than those on a phone) |
| 457 | # <li>Build different analysis models for each device/version. |
| 458 | # </ul> |
| 459 | "manufacturer": "A String", # Manufacturer of the product/hardware. |
| 460 | "type": "A String", # A constant representing the type of the device. |
| 461 | "uid": "A String", # The serial number or other unique ID for the hardware. This field is |
| 462 | # obfuscated when read by any REST or Android client that did not create |
| 463 | # the data source. Only the data source creator will see the uid field in |
| 464 | # clear and normal form. |
| 465 | # |
| 466 | # The obfuscation preserves equality; that is, given two IDs, if id1 == id2, |
| 467 | # obfuscated(id1) == obfuscated(id2). |
| 468 | "model": "A String", # End-user visible model name for the device. |
| 469 | "version": "A String", # Version string for the device hardware/software. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 470 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 471 | "dataType": { # The data type defines the schema for a stream of data being collected by, |
| 472 | # inserted into, or queried from the Fitness API. |
| 473 | "name": "A String", # Each data type has a unique, namespaced, name. All data types in the |
| 474 | # com.google namespace are shared as part of the platform. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 475 | "field": [ # A field represents one dimension of a data type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 476 | { # In case of multi-dimensional data (such as an accelerometer with x, y, and z |
| 477 | # axes) each field represents one dimension. Each data type field has a unique |
| 478 | # name which identifies it. The field also defines the format of the data (int, |
| 479 | # float, etc.). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 480 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 481 | # This message is only instantiated in code and not used for wire comms or |
| 482 | # stored in any way. |
| 483 | "name": "A String", # Defines the name and format of data. Unlike data type names, field names |
| 484 | # are not namespaced, and only need to be unique within the data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 485 | "format": "A String", # The different supported formats for each field in a data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 486 | "optional": True or False, |
| 487 | }, |
| 488 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 489 | }, |
| 490 | "name": "A String", # An end-user visible name for this data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 491 | "dataStreamId": "A String", # A unique identifier for the data stream produced by this data source. The |
| 492 | # identifier includes:<br/><br/> |
| 493 | # <ul> |
| 494 | # <li>The physical device's manufacturer, model, and serial number |
| 495 | # (UID).</li> |
| 496 | # <li>The application's package name or name. Package name is used when the |
| 497 | # data source was created by an Android application. The developer project |
| 498 | # number is used when the data source was created by a REST client.</li> |
| 499 | # <li>The data source's type.</li> |
| 500 | # <li>The data source's stream name.</li> |
| 501 | # </ul> |
| 502 | # Note that not all attributes of the data source are used as part of the |
| 503 | # stream identifier. In particular, the version of the hardware/the |
| 504 | # application isn't used. This allows us to preserve the same stream through |
| 505 | # version updates. This also means that two DataSource objects may represent |
| 506 | # the same data stream even if they're not equal. |
| 507 | # |
| 508 | # The exact format of the data stream ID created by an Android application |
| 509 | # is: |
| 510 | # <var>type:dataType.name<wbr/>:application.packageName<wbr/>:device.manufacturer<wbr/>:device.model<wbr/>:device.uid<wbr/>:dataStreamName</var> |
| 511 | # |
| 512 | # The exact format of the data stream ID created by a REST client is: |
| 513 | # <var>type:dataType.name<wbr/>:developer project |
| 514 | # number<wbr/>:device.manufacturer<wbr/>:device.model:device.uid<wbr/>:dataStreamName</var> |
| 515 | # |
| 516 | # When any of the optional fields that make up the data stream ID are absent, |
| 517 | # they will be omitted from the data stream ID. The minimum viable data |
| 518 | # stream ID would be: |
| 519 | # type:dataType.name:developer project number |
| 520 | # |
| 521 | # Finally, the developer project number and device UID are obfuscated when |
| 522 | # read by any REST or Android client that did not create the data source. |
| 523 | # Only the data source creator will see the developer project number in clear |
| 524 | # and normal form. This means a client will see a different set of |
| 525 | # data_stream_ids than another client with different credentials. |
| 526 | "type": "A String", # A constant describing the type of this data source. Indicates whether this |
| 527 | # data source produces raw or derived data. |
| 528 | "dataQualityStandard": [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the |
| 529 | # platform, and is ignored in queries. It will be removed in a future version |
| 530 | # entirely. |
| 531 | "A String", |
| 532 | ], |
| 533 | "dataStreamName": "A String", # The stream name uniquely identifies this particular data source among |
| 534 | # other data sources of the same type from the same underlying producer. |
| 535 | # Setting the stream name is optional, but should be done whenever an |
| 536 | # application exposes two streams for the same data type, or when a device |
| 537 | # has two equivalent sensors. |
| 538 | "application": { # Information about an application which feeds sensor data into the platform. |
| 539 | "packageName": "A String", # Package name for this application. This is used as a unique |
| 540 | # identifier when created by Android applications, but cannot be specified |
| 541 | # by REST clients. REST clients will have their developer project number |
| 542 | # reflected into the Data Source data stream IDs, instead of the packageName. |
| 543 | "name": "A String", # The name of this application. This is required for REST clients, but we |
| 544 | # do not enforce uniqueness of this name. It is provided as a matter of |
| 545 | # convenience for other developers who would like to identify which REST |
| 546 | # created an Application or Data Source. |
| 547 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 548 | "version": "A String", # Version of the application. You should update this field whenever the |
| 549 | # application changes in a way that affects the computation of the data. |
| 550 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 551 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 552 | </div> |
| 553 | |
| 554 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 555 | <code class="details" id="get">get(userId, dataSourceId, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 556 | <pre>Returns the specified data source. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 557 | |
| 558 | Args: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 559 | userId: string, Retrieve a data source for the person identified. Use <code>me</code> to |
| 560 | indicate the authenticated user. Only <code>me</code> is supported at this |
| 561 | time. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 562 | dataSourceId: string, The data stream ID of the data source to retrieve. (required) |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 563 | x__xgafv: string, V1 error format. |
| 564 | Allowed values |
| 565 | 1 - v1 error format |
| 566 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 567 | |
| 568 | Returns: |
| 569 | An object of the form: |
| 570 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 571 | { # Definition of a unique source of sensor data. Data sources can expose raw |
| 572 | # data coming from hardware sensors on local or companion devices. They can |
| 573 | # also expose derived data, created by transforming or merging other data |
| 574 | # sources. Multiple data sources can exist for the same data type. Every data |
| 575 | # point inserted into or read from this service has an associated data |
| 576 | # source. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 577 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 578 | # The data source contains enough information to uniquely identify its data, |
| 579 | # including the hardware device and the application that collected and/or |
| 580 | # transformed the data. It also holds useful metadata, such as the hardware and |
| 581 | # application versions, and the device type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 582 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 583 | # Each data source produces a unique stream of data, with a unique identifier. |
| 584 | # Not all changes to data source affect the stream identifier, so that data |
| 585 | # collected by updated versions of the same application/device can still be |
| 586 | # considered to belong to the same data stream. |
| 587 | "device": { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that |
| 588 | # can hold sensors. |
| 589 | # can hold sensors. Each sensor is exposed as a data source. |
| 590 | # |
| 591 | # The main purpose of the device information contained in this class is to |
| 592 | # identify the hardware of a particular data source. This can be useful in |
| 593 | # different ways, including: |
| 594 | # <ul> |
| 595 | # <li>Distinguishing two similar sensors on different devices (the step |
| 596 | # counter on two nexus 5 phones, for instance) |
| 597 | # <li>Display the source of data to the user (by using the device make / |
| 598 | # model) |
| 599 | # <li>Treat data differently depending on sensor type (accelerometers on a |
| 600 | # watch may give different patterns than those on a phone) |
| 601 | # <li>Build different analysis models for each device/version. |
| 602 | # </ul> |
| 603 | "manufacturer": "A String", # Manufacturer of the product/hardware. |
| 604 | "type": "A String", # A constant representing the type of the device. |
| 605 | "uid": "A String", # The serial number or other unique ID for the hardware. This field is |
| 606 | # obfuscated when read by any REST or Android client that did not create |
| 607 | # the data source. Only the data source creator will see the uid field in |
| 608 | # clear and normal form. |
| 609 | # |
| 610 | # The obfuscation preserves equality; that is, given two IDs, if id1 == id2, |
| 611 | # obfuscated(id1) == obfuscated(id2). |
| 612 | "model": "A String", # End-user visible model name for the device. |
| 613 | "version": "A String", # Version string for the device hardware/software. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 614 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 615 | "dataType": { # The data type defines the schema for a stream of data being collected by, |
| 616 | # inserted into, or queried from the Fitness API. |
| 617 | "name": "A String", # Each data type has a unique, namespaced, name. All data types in the |
| 618 | # com.google namespace are shared as part of the platform. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 619 | "field": [ # A field represents one dimension of a data type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 620 | { # In case of multi-dimensional data (such as an accelerometer with x, y, and z |
| 621 | # axes) each field represents one dimension. Each data type field has a unique |
| 622 | # name which identifies it. The field also defines the format of the data (int, |
| 623 | # float, etc.). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 624 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 625 | # This message is only instantiated in code and not used for wire comms or |
| 626 | # stored in any way. |
| 627 | "name": "A String", # Defines the name and format of data. Unlike data type names, field names |
| 628 | # are not namespaced, and only need to be unique within the data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 629 | "format": "A String", # The different supported formats for each field in a data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 630 | "optional": True or False, |
| 631 | }, |
| 632 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 633 | }, |
| 634 | "name": "A String", # An end-user visible name for this data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 635 | "dataStreamId": "A String", # A unique identifier for the data stream produced by this data source. The |
| 636 | # identifier includes:<br/><br/> |
| 637 | # <ul> |
| 638 | # <li>The physical device's manufacturer, model, and serial number |
| 639 | # (UID).</li> |
| 640 | # <li>The application's package name or name. Package name is used when the |
| 641 | # data source was created by an Android application. The developer project |
| 642 | # number is used when the data source was created by a REST client.</li> |
| 643 | # <li>The data source's type.</li> |
| 644 | # <li>The data source's stream name.</li> |
| 645 | # </ul> |
| 646 | # Note that not all attributes of the data source are used as part of the |
| 647 | # stream identifier. In particular, the version of the hardware/the |
| 648 | # application isn't used. This allows us to preserve the same stream through |
| 649 | # version updates. This also means that two DataSource objects may represent |
| 650 | # the same data stream even if they're not equal. |
| 651 | # |
| 652 | # The exact format of the data stream ID created by an Android application |
| 653 | # is: |
| 654 | # <var>type:dataType.name<wbr/>:application.packageName<wbr/>:device.manufacturer<wbr/>:device.model<wbr/>:device.uid<wbr/>:dataStreamName</var> |
| 655 | # |
| 656 | # The exact format of the data stream ID created by a REST client is: |
| 657 | # <var>type:dataType.name<wbr/>:developer project |
| 658 | # number<wbr/>:device.manufacturer<wbr/>:device.model:device.uid<wbr/>:dataStreamName</var> |
| 659 | # |
| 660 | # When any of the optional fields that make up the data stream ID are absent, |
| 661 | # they will be omitted from the data stream ID. The minimum viable data |
| 662 | # stream ID would be: |
| 663 | # type:dataType.name:developer project number |
| 664 | # |
| 665 | # Finally, the developer project number and device UID are obfuscated when |
| 666 | # read by any REST or Android client that did not create the data source. |
| 667 | # Only the data source creator will see the developer project number in clear |
| 668 | # and normal form. This means a client will see a different set of |
| 669 | # data_stream_ids than another client with different credentials. |
| 670 | "type": "A String", # A constant describing the type of this data source. Indicates whether this |
| 671 | # data source produces raw or derived data. |
| 672 | "dataQualityStandard": [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the |
| 673 | # platform, and is ignored in queries. It will be removed in a future version |
| 674 | # entirely. |
| 675 | "A String", |
| 676 | ], |
| 677 | "dataStreamName": "A String", # The stream name uniquely identifies this particular data source among |
| 678 | # other data sources of the same type from the same underlying producer. |
| 679 | # Setting the stream name is optional, but should be done whenever an |
| 680 | # application exposes two streams for the same data type, or when a device |
| 681 | # has two equivalent sensors. |
| 682 | "application": { # Information about an application which feeds sensor data into the platform. |
| 683 | "packageName": "A String", # Package name for this application. This is used as a unique |
| 684 | # identifier when created by Android applications, but cannot be specified |
| 685 | # by REST clients. REST clients will have their developer project number |
| 686 | # reflected into the Data Source data stream IDs, instead of the packageName. |
| 687 | "name": "A String", # The name of this application. This is required for REST clients, but we |
| 688 | # do not enforce uniqueness of this name. It is provided as a matter of |
| 689 | # convenience for other developers who would like to identify which REST |
| 690 | # created an Application or Data Source. |
| 691 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 692 | "version": "A String", # Version of the application. You should update this field whenever the |
| 693 | # application changes in a way that affects the computation of the data. |
| 694 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 695 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 696 | </div> |
| 697 | |
| 698 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 699 | <code class="details" id="list">list(userId, dataTypeName=None, x__xgafv=None)</code> |
| 700 | <pre>Lists all data sources that are visible to the developer, using the OAuth |
| 701 | scopes provided. The list is not exhaustive; the user may have private |
| 702 | data sources that are only visible to other developers, or calls using |
| 703 | other scopes. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 704 | |
| 705 | Args: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 706 | userId: string, List data sources for the person identified. Use <code>me</code> to |
| 707 | indicate the authenticated user. Only <code>me</code> is supported at this |
| 708 | time. (required) |
| 709 | dataTypeName: string, The names of data types to include in the list. If not specified, all |
| 710 | data sources will be returned. (repeated) |
| 711 | x__xgafv: string, V1 error format. |
| 712 | Allowed values |
| 713 | 1 - v1 error format |
| 714 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 715 | |
| 716 | Returns: |
| 717 | An object of the form: |
| 718 | |
| 719 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 720 | "dataSource": [ # A previously created data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 721 | { # Definition of a unique source of sensor data. Data sources can expose raw |
| 722 | # data coming from hardware sensors on local or companion devices. They can |
| 723 | # also expose derived data, created by transforming or merging other data |
| 724 | # sources. Multiple data sources can exist for the same data type. Every data |
| 725 | # point inserted into or read from this service has an associated data |
| 726 | # source. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 727 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 728 | # The data source contains enough information to uniquely identify its data, |
| 729 | # including the hardware device and the application that collected and/or |
| 730 | # transformed the data. It also holds useful metadata, such as the hardware and |
| 731 | # application versions, and the device type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 732 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 733 | # Each data source produces a unique stream of data, with a unique identifier. |
| 734 | # Not all changes to data source affect the stream identifier, so that data |
| 735 | # collected by updated versions of the same application/device can still be |
| 736 | # considered to belong to the same data stream. |
| 737 | "device": { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that |
| 738 | # can hold sensors. |
| 739 | # can hold sensors. Each sensor is exposed as a data source. |
| 740 | # |
| 741 | # The main purpose of the device information contained in this class is to |
| 742 | # identify the hardware of a particular data source. This can be useful in |
| 743 | # different ways, including: |
| 744 | # <ul> |
| 745 | # <li>Distinguishing two similar sensors on different devices (the step |
| 746 | # counter on two nexus 5 phones, for instance) |
| 747 | # <li>Display the source of data to the user (by using the device make / |
| 748 | # model) |
| 749 | # <li>Treat data differently depending on sensor type (accelerometers on a |
| 750 | # watch may give different patterns than those on a phone) |
| 751 | # <li>Build different analysis models for each device/version. |
| 752 | # </ul> |
| 753 | "manufacturer": "A String", # Manufacturer of the product/hardware. |
| 754 | "type": "A String", # A constant representing the type of the device. |
| 755 | "uid": "A String", # The serial number or other unique ID for the hardware. This field is |
| 756 | # obfuscated when read by any REST or Android client that did not create |
| 757 | # the data source. Only the data source creator will see the uid field in |
| 758 | # clear and normal form. |
| 759 | # |
| 760 | # The obfuscation preserves equality; that is, given two IDs, if id1 == id2, |
| 761 | # obfuscated(id1) == obfuscated(id2). |
| 762 | "model": "A String", # End-user visible model name for the device. |
| 763 | "version": "A String", # Version string for the device hardware/software. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 764 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 765 | "dataType": { # The data type defines the schema for a stream of data being collected by, |
| 766 | # inserted into, or queried from the Fitness API. |
| 767 | "name": "A String", # Each data type has a unique, namespaced, name. All data types in the |
| 768 | # com.google namespace are shared as part of the platform. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 769 | "field": [ # A field represents one dimension of a data type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 770 | { # In case of multi-dimensional data (such as an accelerometer with x, y, and z |
| 771 | # axes) each field represents one dimension. Each data type field has a unique |
| 772 | # name which identifies it. The field also defines the format of the data (int, |
| 773 | # float, etc.). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 774 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 775 | # This message is only instantiated in code and not used for wire comms or |
| 776 | # stored in any way. |
| 777 | "name": "A String", # Defines the name and format of data. Unlike data type names, field names |
| 778 | # are not namespaced, and only need to be unique within the data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 779 | "format": "A String", # The different supported formats for each field in a data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 780 | "optional": True or False, |
| 781 | }, |
| 782 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 783 | }, |
| 784 | "name": "A String", # An end-user visible name for this data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 785 | "dataStreamId": "A String", # A unique identifier for the data stream produced by this data source. The |
| 786 | # identifier includes:<br/><br/> |
| 787 | # <ul> |
| 788 | # <li>The physical device's manufacturer, model, and serial number |
| 789 | # (UID).</li> |
| 790 | # <li>The application's package name or name. Package name is used when the |
| 791 | # data source was created by an Android application. The developer project |
| 792 | # number is used when the data source was created by a REST client.</li> |
| 793 | # <li>The data source's type.</li> |
| 794 | # <li>The data source's stream name.</li> |
| 795 | # </ul> |
| 796 | # Note that not all attributes of the data source are used as part of the |
| 797 | # stream identifier. In particular, the version of the hardware/the |
| 798 | # application isn't used. This allows us to preserve the same stream through |
| 799 | # version updates. This also means that two DataSource objects may represent |
| 800 | # the same data stream even if they're not equal. |
| 801 | # |
| 802 | # The exact format of the data stream ID created by an Android application |
| 803 | # is: |
| 804 | # <var>type:dataType.name<wbr/>:application.packageName<wbr/>:device.manufacturer<wbr/>:device.model<wbr/>:device.uid<wbr/>:dataStreamName</var> |
| 805 | # |
| 806 | # The exact format of the data stream ID created by a REST client is: |
| 807 | # <var>type:dataType.name<wbr/>:developer project |
| 808 | # number<wbr/>:device.manufacturer<wbr/>:device.model:device.uid<wbr/>:dataStreamName</var> |
| 809 | # |
| 810 | # When any of the optional fields that make up the data stream ID are absent, |
| 811 | # they will be omitted from the data stream ID. The minimum viable data |
| 812 | # stream ID would be: |
| 813 | # type:dataType.name:developer project number |
| 814 | # |
| 815 | # Finally, the developer project number and device UID are obfuscated when |
| 816 | # read by any REST or Android client that did not create the data source. |
| 817 | # Only the data source creator will see the developer project number in clear |
| 818 | # and normal form. This means a client will see a different set of |
| 819 | # data_stream_ids than another client with different credentials. |
| 820 | "type": "A String", # A constant describing the type of this data source. Indicates whether this |
| 821 | # data source produces raw or derived data. |
| 822 | "dataQualityStandard": [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the |
| 823 | # platform, and is ignored in queries. It will be removed in a future version |
| 824 | # entirely. |
| 825 | "A String", |
| 826 | ], |
| 827 | "dataStreamName": "A String", # The stream name uniquely identifies this particular data source among |
| 828 | # other data sources of the same type from the same underlying producer. |
| 829 | # Setting the stream name is optional, but should be done whenever an |
| 830 | # application exposes two streams for the same data type, or when a device |
| 831 | # has two equivalent sensors. |
| 832 | "application": { # Information about an application which feeds sensor data into the platform. |
| 833 | "packageName": "A String", # Package name for this application. This is used as a unique |
| 834 | # identifier when created by Android applications, but cannot be specified |
| 835 | # by REST clients. REST clients will have their developer project number |
| 836 | # reflected into the Data Source data stream IDs, instead of the packageName. |
| 837 | "name": "A String", # The name of this application. This is required for REST clients, but we |
| 838 | # do not enforce uniqueness of this name. It is provided as a matter of |
| 839 | # convenience for other developers who would like to identify which REST |
| 840 | # created an Application or Data Source. |
| 841 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 842 | "version": "A String", # Version of the application. You should update this field whenever the |
| 843 | # application changes in a way that affects the computation of the data. |
| 844 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 845 | }, |
| 846 | ], |
| 847 | }</pre> |
| 848 | </div> |
| 849 | |
| 850 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 851 | <code class="details" id="update">update(userId, dataSourceId, body=None, x__xgafv=None)</code> |
| 852 | <pre>Updates the specified data source. The <code>dataStreamId</code>, |
| 853 | <code>dataType</code>, <code>type</code>, <code>dataStreamName</code>, and |
| 854 | <code>device</code> properties with the exception of <code>version</code>, |
| 855 | cannot be modified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 856 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 857 | Data sources are identified by their <code>dataStreamId</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 858 | |
| 859 | Args: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 860 | userId: string, Update the data source for the person identified. Use <code>me</code> to |
| 861 | indicate the authenticated user. Only <code>me</code> is supported at this |
| 862 | time. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 863 | dataSourceId: string, The data stream ID of the data source to update. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 864 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 865 | The object takes the form of: |
| 866 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 867 | { # Definition of a unique source of sensor data. Data sources can expose raw |
| 868 | # data coming from hardware sensors on local or companion devices. They can |
| 869 | # also expose derived data, created by transforming or merging other data |
| 870 | # sources. Multiple data sources can exist for the same data type. Every data |
| 871 | # point inserted into or read from this service has an associated data |
| 872 | # source. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 873 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 874 | # The data source contains enough information to uniquely identify its data, |
| 875 | # including the hardware device and the application that collected and/or |
| 876 | # transformed the data. It also holds useful metadata, such as the hardware and |
| 877 | # application versions, and the device type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 878 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 879 | # Each data source produces a unique stream of data, with a unique identifier. |
| 880 | # Not all changes to data source affect the stream identifier, so that data |
| 881 | # collected by updated versions of the same application/device can still be |
| 882 | # considered to belong to the same data stream. |
| 883 | "device": { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that |
| 884 | # can hold sensors. |
| 885 | # can hold sensors. Each sensor is exposed as a data source. |
| 886 | # |
| 887 | # The main purpose of the device information contained in this class is to |
| 888 | # identify the hardware of a particular data source. This can be useful in |
| 889 | # different ways, including: |
| 890 | # <ul> |
| 891 | # <li>Distinguishing two similar sensors on different devices (the step |
| 892 | # counter on two nexus 5 phones, for instance) |
| 893 | # <li>Display the source of data to the user (by using the device make / |
| 894 | # model) |
| 895 | # <li>Treat data differently depending on sensor type (accelerometers on a |
| 896 | # watch may give different patterns than those on a phone) |
| 897 | # <li>Build different analysis models for each device/version. |
| 898 | # </ul> |
| 899 | "manufacturer": "A String", # Manufacturer of the product/hardware. |
| 900 | "type": "A String", # A constant representing the type of the device. |
| 901 | "uid": "A String", # The serial number or other unique ID for the hardware. This field is |
| 902 | # obfuscated when read by any REST or Android client that did not create |
| 903 | # the data source. Only the data source creator will see the uid field in |
| 904 | # clear and normal form. |
| 905 | # |
| 906 | # The obfuscation preserves equality; that is, given two IDs, if id1 == id2, |
| 907 | # obfuscated(id1) == obfuscated(id2). |
| 908 | "model": "A String", # End-user visible model name for the device. |
| 909 | "version": "A String", # Version string for the device hardware/software. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 910 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 911 | "dataType": { # The data type defines the schema for a stream of data being collected by, |
| 912 | # inserted into, or queried from the Fitness API. |
| 913 | "name": "A String", # Each data type has a unique, namespaced, name. All data types in the |
| 914 | # com.google namespace are shared as part of the platform. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 915 | "field": [ # A field represents one dimension of a data type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 916 | { # In case of multi-dimensional data (such as an accelerometer with x, y, and z |
| 917 | # axes) each field represents one dimension. Each data type field has a unique |
| 918 | # name which identifies it. The field also defines the format of the data (int, |
| 919 | # float, etc.). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 920 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 921 | # This message is only instantiated in code and not used for wire comms or |
| 922 | # stored in any way. |
| 923 | "name": "A String", # Defines the name and format of data. Unlike data type names, field names |
| 924 | # are not namespaced, and only need to be unique within the data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 925 | "format": "A String", # The different supported formats for each field in a data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 926 | "optional": True or False, |
| 927 | }, |
| 928 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 929 | }, |
| 930 | "name": "A String", # An end-user visible name for this data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 931 | "dataStreamId": "A String", # A unique identifier for the data stream produced by this data source. The |
| 932 | # identifier includes:<br/><br/> |
| 933 | # <ul> |
| 934 | # <li>The physical device's manufacturer, model, and serial number |
| 935 | # (UID).</li> |
| 936 | # <li>The application's package name or name. Package name is used when the |
| 937 | # data source was created by an Android application. The developer project |
| 938 | # number is used when the data source was created by a REST client.</li> |
| 939 | # <li>The data source's type.</li> |
| 940 | # <li>The data source's stream name.</li> |
| 941 | # </ul> |
| 942 | # Note that not all attributes of the data source are used as part of the |
| 943 | # stream identifier. In particular, the version of the hardware/the |
| 944 | # application isn't used. This allows us to preserve the same stream through |
| 945 | # version updates. This also means that two DataSource objects may represent |
| 946 | # the same data stream even if they're not equal. |
| 947 | # |
| 948 | # The exact format of the data stream ID created by an Android application |
| 949 | # is: |
| 950 | # <var>type:dataType.name<wbr/>:application.packageName<wbr/>:device.manufacturer<wbr/>:device.model<wbr/>:device.uid<wbr/>:dataStreamName</var> |
| 951 | # |
| 952 | # The exact format of the data stream ID created by a REST client is: |
| 953 | # <var>type:dataType.name<wbr/>:developer project |
| 954 | # number<wbr/>:device.manufacturer<wbr/>:device.model:device.uid<wbr/>:dataStreamName</var> |
| 955 | # |
| 956 | # When any of the optional fields that make up the data stream ID are absent, |
| 957 | # they will be omitted from the data stream ID. The minimum viable data |
| 958 | # stream ID would be: |
| 959 | # type:dataType.name:developer project number |
| 960 | # |
| 961 | # Finally, the developer project number and device UID are obfuscated when |
| 962 | # read by any REST or Android client that did not create the data source. |
| 963 | # Only the data source creator will see the developer project number in clear |
| 964 | # and normal form. This means a client will see a different set of |
| 965 | # data_stream_ids than another client with different credentials. |
| 966 | "type": "A String", # A constant describing the type of this data source. Indicates whether this |
| 967 | # data source produces raw or derived data. |
| 968 | "dataQualityStandard": [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the |
| 969 | # platform, and is ignored in queries. It will be removed in a future version |
| 970 | # entirely. |
| 971 | "A String", |
| 972 | ], |
| 973 | "dataStreamName": "A String", # The stream name uniquely identifies this particular data source among |
| 974 | # other data sources of the same type from the same underlying producer. |
| 975 | # Setting the stream name is optional, but should be done whenever an |
| 976 | # application exposes two streams for the same data type, or when a device |
| 977 | # has two equivalent sensors. |
| 978 | "application": { # Information about an application which feeds sensor data into the platform. |
| 979 | "packageName": "A String", # Package name for this application. This is used as a unique |
| 980 | # identifier when created by Android applications, but cannot be specified |
| 981 | # by REST clients. REST clients will have their developer project number |
| 982 | # reflected into the Data Source data stream IDs, instead of the packageName. |
| 983 | "name": "A String", # The name of this application. This is required for REST clients, but we |
| 984 | # do not enforce uniqueness of this name. It is provided as a matter of |
| 985 | # convenience for other developers who would like to identify which REST |
| 986 | # created an Application or Data Source. |
| 987 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 988 | "version": "A String", # Version of the application. You should update this field whenever the |
| 989 | # application changes in a way that affects the computation of the data. |
| 990 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 991 | } |
| 992 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 993 | x__xgafv: string, V1 error format. |
| 994 | Allowed values |
| 995 | 1 - v1 error format |
| 996 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 997 | |
| 998 | Returns: |
| 999 | An object of the form: |
| 1000 | |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1001 | { # Definition of a unique source of sensor data. Data sources can expose raw |
| 1002 | # data coming from hardware sensors on local or companion devices. They can |
| 1003 | # also expose derived data, created by transforming or merging other data |
| 1004 | # sources. Multiple data sources can exist for the same data type. Every data |
| 1005 | # point inserted into or read from this service has an associated data |
| 1006 | # source. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1007 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1008 | # The data source contains enough information to uniquely identify its data, |
| 1009 | # including the hardware device and the application that collected and/or |
| 1010 | # transformed the data. It also holds useful metadata, such as the hardware and |
| 1011 | # application versions, and the device type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1012 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1013 | # Each data source produces a unique stream of data, with a unique identifier. |
| 1014 | # Not all changes to data source affect the stream identifier, so that data |
| 1015 | # collected by updated versions of the same application/device can still be |
| 1016 | # considered to belong to the same data stream. |
| 1017 | "device": { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that |
| 1018 | # can hold sensors. |
| 1019 | # can hold sensors. Each sensor is exposed as a data source. |
| 1020 | # |
| 1021 | # The main purpose of the device information contained in this class is to |
| 1022 | # identify the hardware of a particular data source. This can be useful in |
| 1023 | # different ways, including: |
| 1024 | # <ul> |
| 1025 | # <li>Distinguishing two similar sensors on different devices (the step |
| 1026 | # counter on two nexus 5 phones, for instance) |
| 1027 | # <li>Display the source of data to the user (by using the device make / |
| 1028 | # model) |
| 1029 | # <li>Treat data differently depending on sensor type (accelerometers on a |
| 1030 | # watch may give different patterns than those on a phone) |
| 1031 | # <li>Build different analysis models for each device/version. |
| 1032 | # </ul> |
| 1033 | "manufacturer": "A String", # Manufacturer of the product/hardware. |
| 1034 | "type": "A String", # A constant representing the type of the device. |
| 1035 | "uid": "A String", # The serial number or other unique ID for the hardware. This field is |
| 1036 | # obfuscated when read by any REST or Android client that did not create |
| 1037 | # the data source. Only the data source creator will see the uid field in |
| 1038 | # clear and normal form. |
| 1039 | # |
| 1040 | # The obfuscation preserves equality; that is, given two IDs, if id1 == id2, |
| 1041 | # obfuscated(id1) == obfuscated(id2). |
| 1042 | "model": "A String", # End-user visible model name for the device. |
| 1043 | "version": "A String", # Version string for the device hardware/software. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1044 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1045 | "dataType": { # The data type defines the schema for a stream of data being collected by, |
| 1046 | # inserted into, or queried from the Fitness API. |
| 1047 | "name": "A String", # Each data type has a unique, namespaced, name. All data types in the |
| 1048 | # com.google namespace are shared as part of the platform. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1049 | "field": [ # A field represents one dimension of a data type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1050 | { # In case of multi-dimensional data (such as an accelerometer with x, y, and z |
| 1051 | # axes) each field represents one dimension. Each data type field has a unique |
| 1052 | # name which identifies it. The field also defines the format of the data (int, |
| 1053 | # float, etc.). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1054 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1055 | # This message is only instantiated in code and not used for wire comms or |
| 1056 | # stored in any way. |
| 1057 | "name": "A String", # Defines the name and format of data. Unlike data type names, field names |
| 1058 | # are not namespaced, and only need to be unique within the data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1059 | "format": "A String", # The different supported formats for each field in a data type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1060 | "optional": True or False, |
| 1061 | }, |
| 1062 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1063 | }, |
| 1064 | "name": "A String", # An end-user visible name for this data source. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1065 | "dataStreamId": "A String", # A unique identifier for the data stream produced by this data source. The |
| 1066 | # identifier includes:<br/><br/> |
| 1067 | # <ul> |
| 1068 | # <li>The physical device's manufacturer, model, and serial number |
| 1069 | # (UID).</li> |
| 1070 | # <li>The application's package name or name. Package name is used when the |
| 1071 | # data source was created by an Android application. The developer project |
| 1072 | # number is used when the data source was created by a REST client.</li> |
| 1073 | # <li>The data source's type.</li> |
| 1074 | # <li>The data source's stream name.</li> |
| 1075 | # </ul> |
| 1076 | # Note that not all attributes of the data source are used as part of the |
| 1077 | # stream identifier. In particular, the version of the hardware/the |
| 1078 | # application isn't used. This allows us to preserve the same stream through |
| 1079 | # version updates. This also means that two DataSource objects may represent |
| 1080 | # the same data stream even if they're not equal. |
| 1081 | # |
| 1082 | # The exact format of the data stream ID created by an Android application |
| 1083 | # is: |
| 1084 | # <var>type:dataType.name<wbr/>:application.packageName<wbr/>:device.manufacturer<wbr/>:device.model<wbr/>:device.uid<wbr/>:dataStreamName</var> |
| 1085 | # |
| 1086 | # The exact format of the data stream ID created by a REST client is: |
| 1087 | # <var>type:dataType.name<wbr/>:developer project |
| 1088 | # number<wbr/>:device.manufacturer<wbr/>:device.model:device.uid<wbr/>:dataStreamName</var> |
| 1089 | # |
| 1090 | # When any of the optional fields that make up the data stream ID are absent, |
| 1091 | # they will be omitted from the data stream ID. The minimum viable data |
| 1092 | # stream ID would be: |
| 1093 | # type:dataType.name:developer project number |
| 1094 | # |
| 1095 | # Finally, the developer project number and device UID are obfuscated when |
| 1096 | # read by any REST or Android client that did not create the data source. |
| 1097 | # Only the data source creator will see the developer project number in clear |
| 1098 | # and normal form. This means a client will see a different set of |
| 1099 | # data_stream_ids than another client with different credentials. |
| 1100 | "type": "A String", # A constant describing the type of this data source. Indicates whether this |
| 1101 | # data source produces raw or derived data. |
| 1102 | "dataQualityStandard": [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the |
| 1103 | # platform, and is ignored in queries. It will be removed in a future version |
| 1104 | # entirely. |
| 1105 | "A String", |
| 1106 | ], |
| 1107 | "dataStreamName": "A String", # The stream name uniquely identifies this particular data source among |
| 1108 | # other data sources of the same type from the same underlying producer. |
| 1109 | # Setting the stream name is optional, but should be done whenever an |
| 1110 | # application exposes two streams for the same data type, or when a device |
| 1111 | # has two equivalent sensors. |
| 1112 | "application": { # Information about an application which feeds sensor data into the platform. |
| 1113 | "packageName": "A String", # Package name for this application. This is used as a unique |
| 1114 | # identifier when created by Android applications, but cannot be specified |
| 1115 | # by REST clients. REST clients will have their developer project number |
| 1116 | # reflected into the Data Source data stream IDs, instead of the packageName. |
| 1117 | "name": "A String", # The name of this application. This is required for REST clients, but we |
| 1118 | # do not enforce uniqueness of this name. It is provided as a matter of |
| 1119 | # convenience for other developers who would like to identify which REST |
| 1120 | # created an Application or Data Source. |
| 1121 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 1122 | "version": "A String", # Version of the application. You should update this field whenever the |
| 1123 | # application changes in a way that affects the computation of the data. |
| 1124 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1125 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1126 | </div> |
| 1127 | |
| 1128 | </body></html> |