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 first 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", # Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp. 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 "rawTimestampNanos": "A String", # The raw timestamp from the original SensorEvent. 159 }, 160 ], 161 }</pre> 162</div> 163 164<div class="method"> 165 <code class="details" id="get_next">get_next(previous_request, previous_response)</code> 166 <pre>Retrieves the next page of results. 167 168Args: 169 previous_request: The request for the previous page. (required) 170 previous_response: The response from the request for the previous page. (required) 171 172Returns: 173 A request object that you can call 'execute()' on to request the next 174 page. Returns None if there are no more items in the collection. 175 </pre> 176</div> 177 178<div class="method"> 179 <code class="details" id="patch">patch(userId, dataSourceId, datasetId, body, currentTimeMillis=None)</code> 180 <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. 181 182Args: 183 userId: string, Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required) 184 dataSourceId: string, The data stream ID of the data source that created the dataset. (required) 185 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) 186 body: object, The request body. (required) 187 The object takes the form of: 188 189{ # 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. 190 "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. 191 "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. 192 "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 first part of the dataset identifier. 193 "dataSourceId": "A String", # The data stream ID of the data source that created the points in this dataset. 194 "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. 195 { # 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. 196 # 197 # 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. 198 # 199 # Data points always contain one value for each field of the data type. 200 "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. 201 "startTimeNanos": "A String", # The start time of the interval represented by this data point, in nanoseconds since epoch. 202 "dataTypeName": "A String", # The data type defining the format of the values in this data point. 203 "endTimeNanos": "A String", # The end time of the interval represented by this data point, in nanoseconds since epoch. 204 "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. 205 # 206 # Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field. 207 { # Holder object for the value of a single field in a data point. 208 # 209 # A field value has a particular format and is only ever set to one of an integer or a floating point value. LINT.IfChange 210 "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. 211 { 212 "value": { # Holder object for the value of an entry in a map field of a data point. 213 # 214 # A map value supports a subset of the formats that the regular Value supports. 215 "fpVal": 3.14, # Floating point value. 216 }, 217 "key": "A String", 218 }, 219 ], 220 "fpVal": 3.14, # Floating point value. When this is set, other values must not be set. 221 "intVal": 42, # Integer value. When this is set, other values must not be set. 222 "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. 223 }, 224 ], 225 "computationTimeMillis": "A String", # Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp. 226 "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. 227 "rawTimestampNanos": "A String", # The raw timestamp from the original SensorEvent. 228 }, 229 ], 230 } 231 232 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. 233 234Returns: 235 An object of the form: 236 237 { # 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. 238 "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. 239 "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. 240 "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 first part of the dataset identifier. 241 "dataSourceId": "A String", # The data stream ID of the data source that created the points in this dataset. 242 "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. 243 { # 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. 244 # 245 # 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. 246 # 247 # Data points always contain one value for each field of the data type. 248 "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. 249 "startTimeNanos": "A String", # The start time of the interval represented by this data point, in nanoseconds since epoch. 250 "dataTypeName": "A String", # The data type defining the format of the values in this data point. 251 "endTimeNanos": "A String", # The end time of the interval represented by this data point, in nanoseconds since epoch. 252 "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. 253 # 254 # Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field. 255 { # Holder object for the value of a single field in a data point. 256 # 257 # A field value has a particular format and is only ever set to one of an integer or a floating point value. LINT.IfChange 258 "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. 259 { 260 "value": { # Holder object for the value of an entry in a map field of a data point. 261 # 262 # A map value supports a subset of the formats that the regular Value supports. 263 "fpVal": 3.14, # Floating point value. 264 }, 265 "key": "A String", 266 }, 267 ], 268 "fpVal": 3.14, # Floating point value. When this is set, other values must not be set. 269 "intVal": 42, # Integer value. When this is set, other values must not be set. 270 "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. 271 }, 272 ], 273 "computationTimeMillis": "A String", # Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp. 274 "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. 275 "rawTimestampNanos": "A String", # The raw timestamp from the original SensorEvent. 276 }, 277 ], 278 }</pre> 279</div> 280 281<div class="method"> 282 <code class="details" id="patch_next">patch_next(previous_request, previous_response)</code> 283 <pre>Retrieves the next page of results. 284 285Args: 286 previous_request: The request for the previous page. (required) 287 previous_response: The response from the request for the previous page. (required) 288 289Returns: 290 A request object that you can call 'execute()' on to request the next 291 page. Returns None if there are no more items in the collection. 292 </pre> 293</div> 294 295</body></html>