blob: e05d7b4d86668ab30f8c2c58c8ea8f1573c87339 [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.sessions.html">sessions</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070078 <code><a href="#delete">delete(userId, sessionId, currentTimeMillis=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080079<p class="firstline">Deletes a session specified by the given session ID.</p>
80<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070081 <code><a href="#list">list(userId, endTime=None, startTime=None, pageToken=None, includeDeleted=None, activityType=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080082<p class="firstline">Lists sessions previously created.</p>
83<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070087 <code><a href="#update">update(userId, sessionId, body=None, currentTimeMillis=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Updates or insert a given session.</p>
89<h3>Method Details</h3>
90<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070091 <code class="details" id="delete">delete(userId, sessionId, currentTimeMillis=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -080092 <pre>Deletes a session specified by the given session ID.
93
94Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070095 userId: string, Delete a session for the person identified. Use &lt;code&gt;me&lt;/code&gt; to indicate
96the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this time. (required)
Craig Citroe633be12015-03-02 13:40:36 -080097 sessionId: string, The ID of the session to be deleted. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -070098 currentTimeMillis: string, The client&#x27;s current time in milliseconds since epoch.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070099 x__xgafv: string, V1 error format.
100 Allowed values
101 1 - v1 error format
102 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800103</pre>
104</div>
105
106<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700107 <code class="details" id="list">list(userId, endTime=None, startTime=None, pageToken=None, includeDeleted=None, activityType=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800108 <pre>Lists sessions previously created.
109
110Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700111 userId: string, List sessions for the person identified. Use &lt;code&gt;me&lt;/code&gt; to indicate
112the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this time. (required)
113 endTime: string, An &lt;a href=&quot;https://www.ietf.org/rfc/rfc3339.txt&quot;&gt;RFC3339&lt;/a&gt; timestamp.
114Only sessions ending between the start and end times will be included in
115the response. If this time is omitted but &lt;var&gt;startTime&lt;/var&gt; is
116specified, all sessions from &lt;var&gt;startTime&lt;/var&gt; to the end of time will
117be returned.
118 startTime: string, An &lt;a href=&quot;https://www.ietf.org/rfc/rfc3339.txt&quot;&gt;RFC3339&lt;/a&gt; timestamp.
119Only sessions ending between the start and end times will be included in
120the response. If this time is omitted but &lt;var&gt;endTime&lt;/var&gt; is specified,
121all sessions from the start of time up to &lt;var&gt;endTime&lt;/var&gt; will be
122returned.
123 pageToken: string, The continuation token, which is used for incremental syncing.
124To get the next batch of changes, set this parameter to the value of
125&lt;code&gt;nextPageToken&lt;/code&gt; from the previous response. The page token is
126ignored if either start or end time is specified. If none of start time,
127end time, and the page token is specified, sessions modified in the last
12830 days are returned.
129 includeDeleted: boolean, If true, and if both &lt;var&gt;startTime&lt;/var&gt; and &lt;var&gt;endTime&lt;/var&gt; are
130omitted, session deletions will be returned.
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 activityType: integer, If non-empty, only sessions with these activity types should be returned. (repeated)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700132 x__xgafv: string, V1 error format.
133 Allowed values
134 1 - v1 error format
135 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800136
137Returns:
138 An object of the form:
139
140 {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700141 &quot;deletedSession&quot;: [ # If &lt;code&gt;includeDeleted&lt;/code&gt; is set to true in the request, and
142 # &lt;var&gt;startTime&lt;/var&gt; and &lt;var&gt;endTime&lt;/var&gt; are omitted, this will include
143 # sessions which were deleted since the last sync.
144 { # Sessions contain metadata, such as a user-friendly name and time interval
145 # information.
146 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by
147 # this particular user.
148 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700150 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
151 # identifier when created by Android applications, but cannot be specified
152 # by REST clients. REST clients will have their developer project number
153 # reflected into the Data Source data stream IDs, instead of the packageName.
154 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
155 # do not enforce uniqueness of this name. It is provided as a matter of
156 # convenience for other developers who would like to identify which REST
157 # created an Application or Data Source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700159 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
160 # application changes in a way that affects the computation of the data.
Craig Citroe633be12015-03-02 13:40:36 -0800161 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700163 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
164 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
166 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700167 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
168 # the full session time, the active time can be shorter and specified by
169 # active_time_millis.
170 # If the inactive time during the session is known, it should also be
171 # inserted via a com.google.activity.segment data point with a STILL
172 # activity value
Craig Citroe633be12015-03-02 13:40:36 -0800173 },
174 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700175 &quot;session&quot;: [ # Sessions with an end time that is between &lt;var&gt;startTime&lt;/var&gt; and
176 # &lt;var&gt;endTime&lt;/var&gt; of the request.
177 { # Sessions contain metadata, such as a user-friendly name and time interval
178 # information.
179 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by
180 # this particular user.
181 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700183 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
184 # identifier when created by Android applications, but cannot be specified
185 # by REST clients. REST clients will have their developer project number
186 # reflected into the Data Source data stream IDs, instead of the packageName.
187 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
188 # do not enforce uniqueness of this name. It is provided as a matter of
189 # convenience for other developers who would like to identify which REST
190 # created an Application or Data Source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700191 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700192 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
193 # application changes in a way that affects the computation of the data.
Craig Citroe633be12015-03-02 13:40:36 -0800194 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700196 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
197 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim65020912020-05-20 12:08:20 -0700198 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
199 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700200 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
201 # the full session time, the active time can be shorter and specified by
202 # active_time_millis.
203 # If the inactive time during the session is known, it should also be
204 # inserted via a com.google.activity.segment data point with a STILL
205 # activity value
Craig Citroe633be12015-03-02 13:40:36 -0800206 },
207 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700208 &quot;nextPageToken&quot;: &quot;A String&quot;, # The sync token which is used to sync further changes. This will only be
209 # provided if both &lt;var&gt;startTime&lt;/var&gt; and &lt;var&gt;endTime&lt;/var&gt; are omitted
210 # from the request.
211 &quot;hasMoreData&quot;: True or False, # Flag to indicate server has more data to transfer.
212 # DO NOT USE THIS FIELD. It is never populated in responses from the server.
Craig Citroe633be12015-03-02 13:40:36 -0800213 }</pre>
214</div>
215
216<div class="method">
217 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
218 <pre>Retrieves the next page of results.
219
220Args:
221 previous_request: The request for the previous page. (required)
222 previous_response: The response from the request for the previous page. (required)
223
224Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -0800226 page. Returns None if there are no more items in the collection.
227 </pre>
228</div>
229
230<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700231 <code class="details" id="update">update(userId, sessionId, body=None, currentTimeMillis=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800232 <pre>Updates or insert a given session.
233
234Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700235 userId: string, Create sessions for the person identified. Use &lt;code&gt;me&lt;/code&gt; to indicate
236the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this time. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800237 sessionId: string, The ID of the session to be created. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700238 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800239 The object takes the form of:
240
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700241{ # Sessions contain metadata, such as a user-friendly name and time interval
242 # information.
243 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by
244 # this particular user.
245 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700247 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
248 # identifier when created by Android applications, but cannot be specified
249 # by REST clients. REST clients will have their developer project number
250 # reflected into the Data Source data stream IDs, instead of the packageName.
251 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
252 # do not enforce uniqueness of this name. It is provided as a matter of
253 # convenience for other developers who would like to identify which REST
254 # created an Application or Data Source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700255 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700256 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
257 # application changes in a way that affects the computation of the data.
Craig Citroe633be12015-03-02 13:40:36 -0800258 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700259 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700260 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
261 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
263 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700264 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
265 # the full session time, the active time can be shorter and specified by
266 # active_time_millis.
267 # If the inactive time during the session is known, it should also be
268 # inserted via a com.google.activity.segment data point with a STILL
269 # activity value
Craig Citroe633be12015-03-02 13:40:36 -0800270}
271
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 currentTimeMillis: string, The client&#x27;s current time in milliseconds since epoch.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700273 x__xgafv: string, V1 error format.
274 Allowed values
275 1 - v1 error format
276 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800277
278Returns:
279 An object of the form:
280
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700281 { # Sessions contain metadata, such as a user-friendly name and time interval
282 # information.
283 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by
284 # this particular user.
285 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700287 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
288 # identifier when created by Android applications, but cannot be specified
289 # by REST clients. REST clients will have their developer project number
290 # reflected into the Data Source data stream IDs, instead of the packageName.
291 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
292 # do not enforce uniqueness of this name. It is provided as a matter of
293 # convenience for other developers who would like to identify which REST
294 # created an Application or Data Source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700296 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
297 # application changes in a way that affects the computation of the data.
Craig Citroe633be12015-03-02 13:40:36 -0800298 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700299 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700300 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
301 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
303 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700304 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
305 # the full session time, the active time can be shorter and specified by
306 # active_time_millis.
307 # If the inactive time during the session is known, it should also be
308 # inserted via a com.google.activity.segment data point with a STILL
309 # activity value
Craig Citroe633be12015-03-02 13:40:36 -0800310 }</pre>
311</div>
312
313</body></html>