blob: 6017b04679b3552b5eac7e1ac488a150bbccae0f [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">
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">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070081 <code><a href="#delete">delete(userId, sessionId, currentTimeMillis=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080082<p class="firstline">Deletes a session specified by the given session ID.</p>
83<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080084 <code><a href="#list">list(userId, activityType=None, endTime=None, includeDeleted=None, pageToken=None, startTime=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080085<p class="firstline">Lists sessions previously created.</p>
86<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070090 <code><a href="#update">update(userId, sessionId, body=None, currentTimeMillis=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080091<p class="firstline">Updates or insert a given session.</p>
92<h3>Method Details</h3>
93<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094 <code class="details" id="close">close()</code>
95 <pre>Close httplib2 connections.</pre>
96</div>
97
98<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070099 <code class="details" id="delete">delete(userId, sessionId, currentTimeMillis=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800100 <pre>Deletes a session specified by the given session ID.
101
102Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 userId: string, Delete a session 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 -0800104 sessionId: string, The ID of the session to be deleted. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 currentTimeMillis: string, The client&#x27;s current time in milliseconds since epoch.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700106 x__xgafv: string, V1 error format.
107 Allowed values
108 1 - v1 error format
109 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800110</pre>
111</div>
112
113<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800114 <code class="details" id="list">list(userId, activityType=None, endTime=None, includeDeleted=None, pageToken=None, startTime=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800115 <pre>Lists sessions previously created.
116
117Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118 userId: string, List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800119 activityType: integer, If non-empty, only sessions with these activity types should be returned. (repeated)
120 endTime: string, An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. If this time is omitted but startTime is specified, all sessions from startTime to the end of time will be returned.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800121 includeDeleted: boolean, If true, and if both startTime and endTime are omitted, session deletions will be returned.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800122 pageToken: string, The continuation token, which is used for incremental syncing. To get the next batch of changes, set this parameter to the value of nextPageToken from the previous response. The page token is ignored if either start or end time is specified. If none of start time, end time, and the page token is specified, sessions modified in the last 30 days are returned.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800123 startTime: string, An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. If this time is omitted but endTime is specified, all sessions from the start of time up to endTime will be returned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700124 x__xgafv: string, V1 error format.
125 Allowed values
126 1 - v1 error format
127 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800128
129Returns:
130 An object of the form:
131
132 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800133 &quot;deletedSession&quot;: [ # If includeDeleted is set to true in the request, and startTime and endTime are omitted, this will include sessions which were deleted since the last sync.
134 { # Sessions contain metadata, such as a user-friendly name and time interval information.
135 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define the full session time, the active time can be shorter and specified by active_time_millis. If the inactive time during the session is known, it should also be inserted via a com.google.activity.segment data point with a STILL activity value
136 &quot;activityType&quot;: 42, # The type of activity this session represents.
137 &quot;application&quot;: { # The application that created the session.
138 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
139 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
140 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
141 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800142 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800143 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
144 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
145 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
146 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
147 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
148 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
149 },
150 ],
151 &quot;hasMoreData&quot;: True or False, # Flag to indicate server has more data to transfer. DO NOT USE THIS FIELD. It is never populated in responses from the server.
152 &quot;nextPageToken&quot;: &quot;A String&quot;, # The sync token which is used to sync further changes. This will only be provided if both startTime and endTime are omitted from the request.
153 &quot;session&quot;: [ # Sessions with an end time that is between startTime and endTime of the request.
154 { # Sessions contain metadata, such as a user-friendly name and time interval information.
155 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define the full session time, the active time can be shorter and specified by active_time_millis. If the inactive time during the session is known, it should also be inserted via a com.google.activity.segment data point with a STILL activity value
156 &quot;activityType&quot;: 42, # The type of activity this session represents.
157 &quot;application&quot;: { # The application that created the session.
158 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
159 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
160 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
161 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800162 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800163 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
164 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
165 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
166 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
167 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
168 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
169 },
170 ],
171}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800172</div>
173
174<div class="method">
175 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
176 <pre>Retrieves the next page of results.
177
178Args:
179 previous_request: The request for the previous page. (required)
180 previous_response: The response from the request for the previous page. (required)
181
182Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -0800184 page. Returns None if there are no more items in the collection.
185 </pre>
186</div>
187
188<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700189 <code class="details" id="update">update(userId, sessionId, body=None, currentTimeMillis=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800190 <pre>Updates or insert a given session.
191
192Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700193 userId: string, Create sessions 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 -0800194 sessionId: string, The ID of the session to be created. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800196 The object takes the form of:
197
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700198{ # Sessions contain metadata, such as a user-friendly name and time interval information.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800199 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define the full session time, the active time can be shorter and specified by active_time_millis. If the inactive time during the session is known, it should also be inserted via a com.google.activity.segment data point with a STILL activity value
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800200 &quot;activityType&quot;: 42, # The type of activity this session represents.
201 &quot;application&quot;: { # The application that created the session.
202 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
203 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
204 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
205 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
206 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800207 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800208 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800209 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800210 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
211 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
212 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
Craig Citroe633be12015-03-02 13:40:36 -0800213}
214
Bu Sun Kim65020912020-05-20 12:08:20 -0700215 currentTimeMillis: string, The client&#x27;s current time in milliseconds since epoch.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700216 x__xgafv: string, V1 error format.
217 Allowed values
218 1 - v1 error format
219 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800220
221Returns:
222 An object of the form:
223
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700224 { # Sessions contain metadata, such as a user-friendly name and time interval information.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800225 &quot;activeTimeMillis&quot;: &quot;A String&quot;, # Session active time. While start_time_millis and end_time_millis define the full session time, the active time can be shorter and specified by active_time_millis. If the inactive time during the session is known, it should also be inserted via a com.google.activity.segment data point with a STILL activity value
226 &quot;activityType&quot;: 42, # The type of activity this session represents.
227 &quot;application&quot;: { # The application that created the session.
228 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
229 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
230 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
231 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
232 },
233 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
234 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
235 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
236 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
237 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
238 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
239}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800240</div>
241
242</body></html>