• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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
75<h1><a href="fitness_v1.html">Fitness</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>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#delete">delete(userId, dataSourceId, datasetId, modifiedTimeMillis=None, currentTimeMillis=None)</a></code></p>
79<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>
80<p class="toc_element">
81  <code><a href="#get">get(userId, dataSourceId, datasetId, pageToken=None, limit=None)</a></code></p>
82<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>
83<p class="toc_element">
84  <code><a href="#get_next">get_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87  <code><a href="#patch">patch(userId, dataSourceId, datasetId, body, currentTimeMillis=None)</a></code></p>
88<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.</p>
89<p class="toc_element">
90  <code><a href="#patch_next">patch_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<h3>Method Details</h3>
93<div class="method">
94    <code class="details" id="delete">delete(userId, dataSourceId, datasetId, modifiedTimeMillis=None, currentTimeMillis=None)</code>
95  <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.
96
97Args:
98  userId: string, Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
99  dataSourceId: string, The data stream ID of the data source that created the dataset. (required)
100  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: "startTime-endTime" where startTime and endTime are 64 bit integers. (required)
101  modifiedTimeMillis: string, When the operation was performed on the client.
102  currentTimeMillis: string, The client's current time in milliseconds since epoch.
103</pre>
104</div>
105
106<div class="method">
107    <code class="details" id="get">get(userId, dataSourceId, datasetId, pageToken=None, limit=None)</code>
108  <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.
109
110Args:
111  userId: string, Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
112  dataSourceId: string, The data stream ID of the data source that created the dataset. (required)
113  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: "startTime-endTime" where startTime and endTime are 64 bit integers. (required)
114  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.
115  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.
116
117Returns:
118  An object of the form:
119
120    { # 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.
121      "minStartTimeNs": "A String", # 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.
122      "nextPageToken": "A String", # 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.
123      "maxEndTimeNs": "A String", # 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.
124      "dataSourceId": "A String", # The data stream ID of the data source that created the points in this dataset.
125      "point": [ # A partial list of data points contained in the dataset, ordered by largest endTimeNanos first. 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.
126        { # 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.
127            #
128            # 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.
129            #
130            # Data points always contain one value for each field of the data type.
131          "modifiedTimeMillis": "A String", # 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.
132          "startTimeNanos": "A String", # The start time of the interval represented by this data point, in nanoseconds since epoch.
133          "dataTypeName": "A String", # The data type defining the format of the values in this data point.
134          "endTimeNanos": "A String", # The end time of the interval represented by this data point, in nanoseconds since epoch.
135          "value": [ # 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.
136              #
137              # Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field.
138            { # Holder object for the value of a single field in a data point.
139                #
140                # A field value has a particular format and is only ever set to one of an integer or a floating point value. LINT.IfChange
141              "mapVal": [ # 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.
142                {
143                  "value": { # Holder object for the value of an entry in a map field of a data point.
144                      #
145                      # A map value supports a subset of the formats that the regular Value supports.
146                    "fpVal": 3.14, # Floating point value.
147                  },
148                  "key": "A String",
149                },
150              ],
151              "fpVal": 3.14, # Floating point value. When this is set, other values must not be set.
152              "intVal": 42, # Integer value. When this is set, other values must not be set.
153              "stringVal": "A String", # 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.
154            },
155          ],
156          "computationTimeMillis": "A String", # DO NOT USE THIS FIELD. It is ignored, and not stored.
157          "originDataSourceId": "A String", # 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.
158              #
159              # 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.
160          "rawTimestampNanos": "A String", # The raw timestamp from the original SensorEvent.
161        },
162      ],
163    }</pre>
164</div>
165
166<div class="method">
167    <code class="details" id="get_next">get_next(previous_request, previous_response)</code>
168  <pre>Retrieves the next page of results.
169
170Args:
171  previous_request: The request for the previous page. (required)
172  previous_response: The response from the request for the previous page. (required)
173
174Returns:
175  A request object that you can call 'execute()' on to request the next
176  page. Returns None if there are no more items in the collection.
177    </pre>
178</div>
179
180<div class="method">
181    <code class="details" id="patch">patch(userId, dataSourceId, datasetId, body, currentTimeMillis=None)</code>
182  <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.
183
184Args:
185  userId: string, Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
186  dataSourceId: string, The data stream ID of the data source that created the dataset. (required)
187  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: "startTime-endTime" where startTime and endTime are 64 bit integers. (required)
188  body: object, The request body. (required)
189    The object takes the form of:
190
191{ # 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.
192    "minStartTimeNs": "A String", # 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.
193    "nextPageToken": "A String", # 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.
194    "maxEndTimeNs": "A String", # 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.
195    "dataSourceId": "A String", # The data stream ID of the data source that created the points in this dataset.
196    "point": [ # A partial list of data points contained in the dataset, ordered by largest endTimeNanos first. 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.
197      { # 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.
198          #
199          # 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.
200          #
201          # Data points always contain one value for each field of the data type.
202        "modifiedTimeMillis": "A String", # 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.
203        "startTimeNanos": "A String", # The start time of the interval represented by this data point, in nanoseconds since epoch.
204        "dataTypeName": "A String", # The data type defining the format of the values in this data point.
205        "endTimeNanos": "A String", # The end time of the interval represented by this data point, in nanoseconds since epoch.
206        "value": [ # 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.
207            #
208            # Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field.
209          { # Holder object for the value of a single field in a data point.
210              #
211              # A field value has a particular format and is only ever set to one of an integer or a floating point value. LINT.IfChange
212            "mapVal": [ # 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.
213              {
214                "value": { # Holder object for the value of an entry in a map field of a data point.
215                    #
216                    # A map value supports a subset of the formats that the regular Value supports.
217                  "fpVal": 3.14, # Floating point value.
218                },
219                "key": "A String",
220              },
221            ],
222            "fpVal": 3.14, # Floating point value. When this is set, other values must not be set.
223            "intVal": 42, # Integer value. When this is set, other values must not be set.
224            "stringVal": "A String", # 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.
225          },
226        ],
227        "computationTimeMillis": "A String", # DO NOT USE THIS FIELD. It is ignored, and not stored.
228        "originDataSourceId": "A String", # 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.
229            #
230            # 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.
231        "rawTimestampNanos": "A String", # The raw timestamp from the original SensorEvent.
232      },
233    ],
234  }
235
236  currentTimeMillis: string, The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds instead of milliseconds.
237
238Returns:
239  An object of the form:
240
241    { # 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.
242      "minStartTimeNs": "A String", # 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.
243      "nextPageToken": "A String", # 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.
244      "maxEndTimeNs": "A String", # 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.
245      "dataSourceId": "A String", # The data stream ID of the data source that created the points in this dataset.
246      "point": [ # A partial list of data points contained in the dataset, ordered by largest endTimeNanos first. 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.
247        { # 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.
248            #
249            # 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.
250            #
251            # Data points always contain one value for each field of the data type.
252          "modifiedTimeMillis": "A String", # 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.
253          "startTimeNanos": "A String", # The start time of the interval represented by this data point, in nanoseconds since epoch.
254          "dataTypeName": "A String", # The data type defining the format of the values in this data point.
255          "endTimeNanos": "A String", # The end time of the interval represented by this data point, in nanoseconds since epoch.
256          "value": [ # 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.
257              #
258              # Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field.
259            { # Holder object for the value of a single field in a data point.
260                #
261                # A field value has a particular format and is only ever set to one of an integer or a floating point value. LINT.IfChange
262              "mapVal": [ # 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.
263                {
264                  "value": { # Holder object for the value of an entry in a map field of a data point.
265                      #
266                      # A map value supports a subset of the formats that the regular Value supports.
267                    "fpVal": 3.14, # Floating point value.
268                  },
269                  "key": "A String",
270                },
271              ],
272              "fpVal": 3.14, # Floating point value. When this is set, other values must not be set.
273              "intVal": 42, # Integer value. When this is set, other values must not be set.
274              "stringVal": "A String", # 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.
275            },
276          ],
277          "computationTimeMillis": "A String", # DO NOT USE THIS FIELD. It is ignored, and not stored.
278          "originDataSourceId": "A String", # 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.
279              #
280              # 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.
281          "rawTimestampNanos": "A String", # The raw timestamp from the original SensorEvent.
282        },
283      ],
284    }</pre>
285</div>
286
287<div class="method">
288    <code class="details" id="patch_next">patch_next(previous_request, previous_response)</code>
289  <pre>Retrieves the next page of results.
290
291Args:
292  previous_request: The request for the previous page. (required)
293  previous_response: The response from the request for the previous page. (required)
294
295Returns:
296  A request object that you can call 'execute()' on to request the next
297  page. Returns None if there are no more items in the collection.
298    </pre>
299</div>
300
301</body></html>