blob: bb2710d9896de55003c378cda060729f920f23d1 [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 Kimd059ad82020-07-22 17:02:09 -070081 <code><a href="#list">list(userId, includeDeleted=None, startTime=None, activityType=None, pageToken=None, endTime=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 Kimd059ad82020-07-22 17:02:09 -0700107 <code class="details" id="list">list(userId, includeDeleted=None, startTime=None, activityType=None, pageToken=None, endTime=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)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700113 includeDeleted: boolean, If true, and if both &lt;var&gt;startTime&lt;/var&gt; and &lt;var&gt;endTime&lt;/var&gt; are
114omitted, session deletions will be returned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700115 startTime: string, An &lt;a href=&quot;https://www.ietf.org/rfc/rfc3339.txt&quot;&gt;RFC3339&lt;/a&gt; timestamp.
116Only sessions ending between the start and end times will be included in
117the response. If this time is omitted but &lt;var&gt;endTime&lt;/var&gt; is specified,
118all sessions from the start of time up to &lt;var&gt;endTime&lt;/var&gt; will be
119returned.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700120 activityType: integer, If non-empty, only sessions with these activity types should be returned. (repeated)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700121 pageToken: string, The continuation token, which is used for incremental syncing.
122To get the next batch of changes, set this parameter to the value of
123&lt;code&gt;nextPageToken&lt;/code&gt; from the previous response. The page token is
124ignored if either start or end time is specified. If none of start time,
125end time, and the page token is specified, sessions modified in the last
12630 days are returned.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700127 endTime: string, An &lt;a href=&quot;https://www.ietf.org/rfc/rfc3339.txt&quot;&gt;RFC3339&lt;/a&gt; timestamp.
128Only sessions ending between the start and end times will be included in
129the response. If this time is omitted but &lt;var&gt;startTime&lt;/var&gt; is
130specified, all sessions from &lt;var&gt;startTime&lt;/var&gt; to the end of time will
131be returned.
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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700148 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700149 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700150 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
151 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
152 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim65020912020-05-20 12:08:20 -0700153 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700154 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
155 # identifier when created by Android applications, but cannot be specified
156 # by REST clients. REST clients will have their developer project number
157 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700158 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
159 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700161 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
162 # do not enforce uniqueness of this name. It is provided as a matter of
163 # convenience for other developers who would like to identify which REST
164 # created an Application or Data Source.
Craig Citroe633be12015-03-02 13:40:36 -0800165 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700166 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
167 # the full session time, the active time can be shorter and specified by
168 # active_time_millis.
169 # If the inactive time during the session is known, it should also be
170 # inserted via a com.google.activity.segment data point with a STILL
171 # activity value
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700172 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
Craig Citroe633be12015-03-02 13:40:36 -0800173 },
174 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700175 &quot;nextPageToken&quot;: &quot;A String&quot;, # The sync token which is used to sync further changes. This will only be
176 # provided if both &lt;var&gt;startTime&lt;/var&gt; and &lt;var&gt;endTime&lt;/var&gt; are omitted
177 # from the request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700178 &quot;session&quot;: [ # Sessions with an end time that is between &lt;var&gt;startTime&lt;/var&gt; and
179 # &lt;var&gt;endTime&lt;/var&gt; of the request.
180 { # Sessions contain metadata, such as a user-friendly name and time interval
181 # information.
182 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by
183 # this particular user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700184 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700185 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700186 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
187 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
188 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700190 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
191 # identifier when created by Android applications, but cannot be specified
192 # by REST clients. REST clients will have their developer project number
193 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700194 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
195 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
196 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700197 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
198 # do not enforce uniqueness of this name. It is provided as a matter of
199 # convenience for other developers who would like to identify which REST
200 # created an Application or Data Source.
Craig Citroe633be12015-03-02 13:40:36 -0800201 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700202 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
203 # the full session time, the active time can be shorter and specified by
204 # active_time_millis.
205 # If the inactive time during the session is known, it should also be
206 # inserted via a com.google.activity.segment data point with a STILL
207 # activity value
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700208 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
Craig Citroe633be12015-03-02 13:40:36 -0800209 },
210 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700211 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700245 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700246 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700247 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
248 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
249 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700251 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
252 # identifier when created by Android applications, but cannot be specified
253 # by REST clients. REST clients will have their developer project number
254 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700255 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
256 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700258 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
259 # do not enforce uniqueness of this name. It is provided as a matter of
260 # convenience for other developers who would like to identify which REST
261 # created an Application or Data Source.
Craig Citroe633be12015-03-02 13:40:36 -0800262 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700263 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
264 # the full session time, the active time can be shorter and specified by
265 # active_time_millis.
266 # If the inactive time during the session is known, it should also be
267 # inserted via a com.google.activity.segment data point with a STILL
268 # activity value
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700269 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700285 &quot;activityType&quot;: 42, # The type of activity this session represents.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700286 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700287 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
288 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
289 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;application&quot;: { # The application that created the session.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700291 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
292 # identifier when created by Android applications, but cannot be specified
293 # by REST clients. REST clients will have their developer project number
294 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700295 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
296 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700298 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
299 # do not enforce uniqueness of this name. It is provided as a matter of
300 # convenience for other developers who would like to identify which REST
301 # created an Application or Data Source.
Craig Citroe633be12015-03-02 13:40:36 -0800302 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700303 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define
304 # the full session time, the active time can be shorter and specified by
305 # active_time_millis.
306 # If the inactive time during the session is known, it should also be
307 # inserted via a com.google.activity.segment data point with a STILL
308 # activity value
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700309 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
Craig Citroe633be12015-03-02 13:40:36 -0800310 }</pre>
311</div>
312
313</body></html>