blob: 87670aa3f0bc6e7c37431d88aae94cea313fe923 [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> . <a href="fitness_v1.users.dataSources.datasets.html">datasets</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
yoshi-code-bota8b35b92021-03-31 13:33:30 -070081 <code><a href="#delete">delete(userId, dataSourceId, datasetId, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted.</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080084 <code><a href="#get">get(userId, dataSourceId, datasetId, limit=None, pageToken=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time.</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
87 <code><a href="#get_next">get_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
yoshi-code-bota8b35b92021-03-31 13:33:30 -070090 <code><a href="#patch">patch(userId, dataSourceId, datasetId, body=None, x__xgafv=None)</a></code></p>
yoshi-code-bot69706592021-03-03 03:54:02 -080091<p class="firstline">Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics: the data points provided are merely inserted, with no existing data replaced.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040092<p class="toc_element">
93 <code><a href="#patch_next">patch_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Craig Citroe633be12015-03-02 13:40:36 -080095<h3>Method Details</h3>
96<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99</div>
100
101<div class="method">
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700102 <code class="details" id="delete">delete(userId, dataSourceId, datasetId, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <pre>Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted.
Craig Citroe633be12015-03-02 13:40:36 -0800104
105Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 userId: string, Delete a dataset 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 -0800107 dataSourceId: string, The data stream ID of the data source that created the dataset. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700108 datasetId: string, Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: &quot;startTime-endTime&quot; where startTime and endTime are 64 bit integers. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700109 x__xgafv: string, V1 error format.
110 Allowed values
111 1 - v1 error format
112 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800113</pre>
114</div>
115
116<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800117 <code class="details" id="get">get(userId, dataSourceId, datasetId, limit=None, pageToken=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118 <pre>Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time.
Craig Citroe633be12015-03-02 13:40:36 -0800119
120Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121 userId: string, Retrieve a dataset 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 -0800122 dataSourceId: string, The data stream ID of the data source that created the dataset. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 datasetId: string, Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: &quot;startTime-endTime&quot; where startTime and endTime are 64 bit integers. (required)
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700124 limit: integer, If specified, no more than this many data points will be included in the dataset. If there are more data points in the dataset, nextPageToken will be set in the dataset response. The limit is applied from the end of the time range. That is, if pageToken is absent, the limit most recent data points will be returned.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800125 pageToken: string, The continuation token, which is used to page through large datasets. To get the next page of a dataset, set this parameter to the value of nextPageToken from the previous response. Each subsequent call will yield a partial dataset with data point end timestamps that are strictly smaller than those in the previous partial response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700126 x__xgafv: string, V1 error format.
127 Allowed values
128 1 - v1 error format
129 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800130
131Returns:
132 An object of the form:
133
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700134 { # A dataset represents a projection container for data points. They do not carry any info of their own. Datasets represent a set of data points from a particular data source. A data point can be found in more than one dataset.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800135 &quot;dataSourceId&quot;: &quot;A String&quot;, # The data stream ID of the data source that created the points in this dataset.
136 &quot;maxEndTimeNs&quot;: &quot;A String&quot;, # The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the second part of the dataset identifier.
137 &quot;minStartTimeNs&quot;: &quot;A String&quot;, # The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier.
138 &quot;nextPageToken&quot;: &quot;A String&quot;, # This token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset.
139 &quot;point&quot;: [ # A partial list of data points contained in the dataset, ordered by endTimeNanos. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response.
140 { # Represents a single data point, generated by a particular data source. A data point holds a value for each field, an end timestamp and an optional start time. The exact semantics of each of these attributes are specified in the documentation for the particular data type. A data point can represent an instantaneous measurement, reading or input observation, as well as averages or aggregates over a time interval. Check the data type documentation to determine which is the case for a particular data type. Data points always contain one value for each field of the data type.
141 &quot;computationTimeMillis&quot;: &quot;A String&quot;, # DO NOT USE THIS FIELD. It is ignored, and not stored.
142 &quot;dataTypeName&quot;: &quot;A String&quot;, # The data type defining the format of the values in this data point.
143 &quot;endTimeNanos&quot;: &quot;A String&quot;, # The end time of the interval represented by this data point, in nanoseconds since epoch.
144 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data.
145 &quot;originDataSourceId&quot;: &quot;A String&quot;, # If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally. WARNING: do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent.
146 &quot;rawTimestampNanos&quot;: &quot;A String&quot;, # The raw timestamp from the original SensorEvent.
147 &quot;startTimeNanos&quot;: &quot;A String&quot;, # The start time of the interval represented by this data point, in nanoseconds since epoch.
148 &quot;value&quot;: [ # Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in the data type specified in a data source. Only one of integer and floating point fields will be populated, depending on the format enum value within data source&#x27;s type field.
149 { # Holder object for the value of a single field in a data point. A field value has a particular format and is only ever set to one of an integer or a floating point value.
150 &quot;fpVal&quot;: 3.14, # Floating point value. When this is set, other values must not be set.
151 &quot;intVal&quot;: 42, # Integer value. When this is set, other values must not be set.
152 &quot;mapVal&quot;: [ # Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys should be kept small whenever possible. Data streams with large keys and high data frequency may be down sampled.
153 {
154 &quot;key&quot;: &quot;A String&quot;,
155 &quot;value&quot;: { # Holder object for the value of an entry in a map field of a data point. A map value supports a subset of the formats that the regular Value supports.
156 &quot;fpVal&quot;: 3.14, # Floating point value.
157 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800158 },
159 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800160 &quot;stringVal&quot;: &quot;A String&quot;, # String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and high data frequency may be down sampled.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800161 },
162 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800163 },
164 ],
165}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800166</div>
167
168<div class="method">
169 <code class="details" id="get_next">get_next(previous_request, previous_response)</code>
170 <pre>Retrieves the next page of results.
171
172Args:
173 previous_request: The request for the previous page. (required)
174 previous_response: The response from the request for the previous page. (required)
175
176Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -0800178 page. Returns None if there are no more items in the collection.
179 </pre>
180</div>
181
182<div class="method">
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700183 <code class="details" id="patch">patch(userId, dataSourceId, datasetId, body=None, x__xgafv=None)</code>
yoshi-code-bot69706592021-03-03 03:54:02 -0800184 <pre>Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics: the data points provided are merely inserted, with no existing data replaced.
Craig Citroe633be12015-03-02 13:40:36 -0800185
186Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700187 userId: string, Patch a dataset 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 -0800188 dataSourceId: string, The data stream ID of the data source that created the dataset. (required)
yoshi-code-bot69706592021-03-03 03:54:02 -0800189 datasetId: string, This field is not used, and can be safely omitted. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800191 The object takes the form of:
192
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700193{ # A dataset represents a projection container for data points. They do not carry any info of their own. Datasets represent a set of data points from a particular data source. A data point can be found in more than one dataset.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800194 &quot;dataSourceId&quot;: &quot;A String&quot;, # The data stream ID of the data source that created the points in this dataset.
195 &quot;maxEndTimeNs&quot;: &quot;A String&quot;, # The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the second part of the dataset identifier.
196 &quot;minStartTimeNs&quot;: &quot;A String&quot;, # The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier.
197 &quot;nextPageToken&quot;: &quot;A String&quot;, # This token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset.
198 &quot;point&quot;: [ # A partial list of data points contained in the dataset, ordered by endTimeNanos. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response.
199 { # Represents a single data point, generated by a particular data source. A data point holds a value for each field, an end timestamp and an optional start time. The exact semantics of each of these attributes are specified in the documentation for the particular data type. A data point can represent an instantaneous measurement, reading or input observation, as well as averages or aggregates over a time interval. Check the data type documentation to determine which is the case for a particular data type. Data points always contain one value for each field of the data type.
200 &quot;computationTimeMillis&quot;: &quot;A String&quot;, # DO NOT USE THIS FIELD. It is ignored, and not stored.
201 &quot;dataTypeName&quot;: &quot;A String&quot;, # The data type defining the format of the values in this data point.
202 &quot;endTimeNanos&quot;: &quot;A String&quot;, # The end time of the interval represented by this data point, in nanoseconds since epoch.
203 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data.
204 &quot;originDataSourceId&quot;: &quot;A String&quot;, # If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally. WARNING: do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent.
205 &quot;rawTimestampNanos&quot;: &quot;A String&quot;, # The raw timestamp from the original SensorEvent.
206 &quot;startTimeNanos&quot;: &quot;A String&quot;, # The start time of the interval represented by this data point, in nanoseconds since epoch.
207 &quot;value&quot;: [ # Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in the data type specified in a data source. Only one of integer and floating point fields will be populated, depending on the format enum value within data source&#x27;s type field.
208 { # Holder object for the value of a single field in a data point. A field value has a particular format and is only ever set to one of an integer or a floating point value.
209 &quot;fpVal&quot;: 3.14, # Floating point value. When this is set, other values must not be set.
210 &quot;intVal&quot;: 42, # Integer value. When this is set, other values must not be set.
211 &quot;mapVal&quot;: [ # Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys should be kept small whenever possible. Data streams with large keys and high data frequency may be down sampled.
212 {
213 &quot;key&quot;: &quot;A String&quot;,
214 &quot;value&quot;: { # Holder object for the value of an entry in a map field of a data point. A map value supports a subset of the formats that the regular Value supports.
215 &quot;fpVal&quot;: 3.14, # Floating point value.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700216 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800217 },
218 ],
219 &quot;stringVal&quot;: &quot;A String&quot;, # String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and high data frequency may be down sampled.
220 },
221 ],
222 },
223 ],
224}
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700225
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700226 x__xgafv: string, V1 error format.
227 Allowed values
228 1 - v1 error format
229 2 - v2 error format
230
231Returns:
232 An object of the form:
233
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700234 { # A dataset represents a projection container for data points. They do not carry any info of their own. Datasets represent a set of data points from a particular data source. A data point can be found in more than one dataset.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800235 &quot;dataSourceId&quot;: &quot;A String&quot;, # The data stream ID of the data source that created the points in this dataset.
236 &quot;maxEndTimeNs&quot;: &quot;A String&quot;, # The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the second part of the dataset identifier.
237 &quot;minStartTimeNs&quot;: &quot;A String&quot;, # The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier.
238 &quot;nextPageToken&quot;: &quot;A String&quot;, # This token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset.
239 &quot;point&quot;: [ # A partial list of data points contained in the dataset, ordered by endTimeNanos. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response.
240 { # Represents a single data point, generated by a particular data source. A data point holds a value for each field, an end timestamp and an optional start time. The exact semantics of each of these attributes are specified in the documentation for the particular data type. A data point can represent an instantaneous measurement, reading or input observation, as well as averages or aggregates over a time interval. Check the data type documentation to determine which is the case for a particular data type. Data points always contain one value for each field of the data type.
241 &quot;computationTimeMillis&quot;: &quot;A String&quot;, # DO NOT USE THIS FIELD. It is ignored, and not stored.
242 &quot;dataTypeName&quot;: &quot;A String&quot;, # The data type defining the format of the values in this data point.
243 &quot;endTimeNanos&quot;: &quot;A String&quot;, # The end time of the interval represented by this data point, in nanoseconds since epoch.
244 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data.
245 &quot;originDataSourceId&quot;: &quot;A String&quot;, # If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally. WARNING: do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent.
246 &quot;rawTimestampNanos&quot;: &quot;A String&quot;, # The raw timestamp from the original SensorEvent.
247 &quot;startTimeNanos&quot;: &quot;A String&quot;, # The start time of the interval represented by this data point, in nanoseconds since epoch.
248 &quot;value&quot;: [ # Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in the data type specified in a data source. Only one of integer and floating point fields will be populated, depending on the format enum value within data source&#x27;s type field.
249 { # Holder object for the value of a single field in a data point. A field value has a particular format and is only ever set to one of an integer or a floating point value.
250 &quot;fpVal&quot;: 3.14, # Floating point value. When this is set, other values must not be set.
251 &quot;intVal&quot;: 42, # Integer value. When this is set, other values must not be set.
252 &quot;mapVal&quot;: [ # Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys should be kept small whenever possible. Data streams with large keys and high data frequency may be down sampled.
253 {
254 &quot;key&quot;: &quot;A String&quot;,
255 &quot;value&quot;: { # Holder object for the value of an entry in a map field of a data point. A map value supports a subset of the formats that the regular Value supports.
256 &quot;fpVal&quot;: 3.14, # Floating point value.
257 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800258 },
259 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800260 &quot;stringVal&quot;: &quot;A String&quot;, # String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and high data frequency may be down sampled.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800261 },
262 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800263 },
264 ],
265}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800266</div>
267
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400268<div class="method">
269 <code class="details" id="patch_next">patch_next(previous_request, previous_response)</code>
270 <pre>Retrieves the next page of results.
271
272Args:
273 previous_request: The request for the previous page. (required)
274 previous_response: The response from the request for the previous page. (required)
275
276Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400278 page. Returns None if there are no more items in the collection.
279 </pre>
280</div>
281
Craig Citroe633be12015-03-02 13:40:36 -0800282</body></html>