blob: 80c968315acf2fc2bbc33d1df4b619da543ee333 [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
75<h1><a href="fitness_v1.html">Fitness</a> . <a href="fitness_v1.users.html">users</a> . <a href="fitness_v1.users.sessions.html">sessions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(userId, sessionId, currentTimeMillis=None)</a></code></p>
79<p class="firstline">Deletes a session specified by the given session ID.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#list">list(userId, includeDeleted=None, pageToken=None, startTime=None, activityType=None, endTime=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">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#update">update(userId, sessionId, body=None, currentTimeMillis=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">
91 <code class="details" id="delete">delete(userId, sessionId, currentTimeMillis=None)</code>
92 <pre>Deletes a session specified by the given session ID.
93
94Args:
95 userId: string, Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
96 sessionId: string, The ID of the session to be deleted. (required)
97 currentTimeMillis: string, The client's current time in milliseconds since epoch.
98</pre>
99</div>
100
101<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code class="details" id="list">list(userId, includeDeleted=None, pageToken=None, startTime=None, activityType=None, endTime=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800103 <pre>Lists sessions previously created.
104
105Args:
106 userId: string, List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
107 includeDeleted: boolean, If true, deleted sessions will be returned. When set to true, sessions returned in this response will only have an ID and will not have any other fields.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 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. This token is treated as a timestamp (in millis since epoch). If specified, the API returns sessions modified since this time. 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.
Craig Citroe633be12015-03-02 13:40:36 -0800109 startTime: string, An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700110 activityType: integer, If non-empty, only sessions with these activity types should be returned. (repeated)
Craig Citroe633be12015-03-02 13:40:36 -0800111 endTime: string, An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.
112
113Returns:
114 An object of the form:
115
116 {
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700117 "hasMoreData": True or False, # Flag to indicate server has more data to transfer
Craig Citroe633be12015-03-02 13:40:36 -0800118 "nextPageToken": "A String", # The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
119 "deletedSession": [ # If includeDeleted is set to true in the request, this list will contain sessions deleted with original end times that are within the startTime and endTime frame.
120 { # Sessions contain metadata, such as a user-friendly name and time interval information.
121 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
122 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
123 "description": "A String", # A description for this session.
124 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700125 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800126 "packageName": "A String", # 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.
127 "version": "A String", # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
128 "name": "A String", # 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.
129 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
130 },
131 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000132 "activeTimeMillis": "A String", # 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
Craig Citroe633be12015-03-02 13:40:36 -0800133 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
134 "name": "A String", # A human readable name of the session.
135 },
136 ],
137 "session": [ # Sessions with an end time that is between startTime and endTime of the request.
138 { # Sessions contain metadata, such as a user-friendly name and time interval information.
139 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
140 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
141 "description": "A String", # A description for this session.
142 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700143 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800144 "packageName": "A String", # 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.
145 "version": "A String", # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
146 "name": "A String", # 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.
147 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
148 },
149 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000150 "activeTimeMillis": "A String", # 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
Craig Citroe633be12015-03-02 13:40:36 -0800151 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
152 "name": "A String", # A human readable name of the session.
153 },
154 ],
155 }</pre>
156</div>
157
158<div class="method">
159 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
160 <pre>Retrieves the next page of results.
161
162Args:
163 previous_request: The request for the previous page. (required)
164 previous_response: The response from the request for the previous page. (required)
165
166Returns:
167 A request object that you can call 'execute()' on to request the next
168 page. Returns None if there are no more items in the collection.
169 </pre>
170</div>
171
172<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 <code class="details" id="update">update(userId, sessionId, body=None, currentTimeMillis=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800174 <pre>Updates or insert a given session.
175
176Args:
177 userId: string, Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
178 sessionId: string, The ID of the session to be created. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700179 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800180 The object takes the form of:
181
182{ # Sessions contain metadata, such as a user-friendly name and time interval information.
183 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
184 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
185 "description": "A String", # A description for this session.
186 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700187 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800188 "packageName": "A String", # 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.
189 "version": "A String", # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
190 "name": "A String", # 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.
191 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
192 },
193 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000194 "activeTimeMillis": "A String", # 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
Craig Citroe633be12015-03-02 13:40:36 -0800195 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
196 "name": "A String", # A human readable name of the session.
197}
198
199 currentTimeMillis: string, The client's current time in milliseconds since epoch.
200
201Returns:
202 An object of the form:
203
204 { # Sessions contain metadata, such as a user-friendly name and time interval information.
205 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
206 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
207 "description": "A String", # A description for this session.
208 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700209 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800210 "packageName": "A String", # 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.
211 "version": "A String", # Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
212 "name": "A String", # 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.
213 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
214 },
215 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000216 "activeTimeMillis": "A String", # 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
Craig Citroe633be12015-03-02 13:40:36 -0800217 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
218 "name": "A String", # A human readable name of the session.
219 }</pre>
220</div>
221
222</body></html>