blob: fe8e74a7a2c18fc26fdb0b3eba68f6e6df8c5512 [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">
81 <code><a href="#list">list(userId, includeDeleted=None, pageToken=None, startTime=None, endTime=None)</a></code></p>
82<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">
87 <code><a href="#update">update(userId, sessionId, body, currentTimeMillis=None)</a></code></p>
88<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">
102 <code class="details" id="list">list(userId, includeDeleted=None, pageToken=None, startTime=None, endTime=None)</code>
103 <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.
110 endTime: string, An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.
111
112Returns:
113 An object of the form:
114
115 {
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700116 "hasMoreData": True or False, # Flag to indicate server has more data to transfer
Craig Citroe633be12015-03-02 13:40:36 -0800117 "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.
118 "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.
119 { # Sessions contain metadata, such as a user-friendly name and time interval information.
120 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
121 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
122 "description": "A String", # A description for this session.
123 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700124 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800125 "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.
126 "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.
127 "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.
128 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
129 },
130 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000131 "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 -0800132 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
133 "name": "A String", # A human readable name of the session.
134 },
135 ],
136 "session": [ # Sessions with an end time that is between startTime and endTime of the request.
137 { # Sessions contain metadata, such as a user-friendly name and time interval information.
138 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
139 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
140 "description": "A String", # A description for this session.
141 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700142 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800143 "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.
144 "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.
145 "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.
146 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
147 },
148 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000149 "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 -0800150 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
151 "name": "A String", # A human readable name of the session.
152 },
153 ],
154 }</pre>
155</div>
156
157<div class="method">
158 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
159 <pre>Retrieves the next page of results.
160
161Args:
162 previous_request: The request for the previous page. (required)
163 previous_response: The response from the request for the previous page. (required)
164
165Returns:
166 A request object that you can call 'execute()' on to request the next
167 page. Returns None if there are no more items in the collection.
168 </pre>
169</div>
170
171<div class="method">
172 <code class="details" id="update">update(userId, sessionId, body, currentTimeMillis=None)</code>
173 <pre>Updates or insert a given session.
174
175Args:
176 userId: string, Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required)
177 sessionId: string, The ID of the session to be created. (required)
178 body: object, The request body. (required)
179 The object takes the form of:
180
181{ # Sessions contain metadata, such as a user-friendly name and time interval information.
182 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
183 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
184 "description": "A String", # A description for this session.
185 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700186 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800187 "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.
188 "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.
189 "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.
190 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
191 },
192 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000193 "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 -0800194 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
195 "name": "A String", # A human readable name of the session.
196}
197
198 currentTimeMillis: string, The client's current time in milliseconds since epoch.
199
200Returns:
201 An object of the form:
202
203 { # Sessions contain metadata, such as a user-friendly name and time interval information.
204 "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified.
205 "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive.
206 "description": "A String", # A description for this session.
207 "activityType": 42, # The type of activity this session represents.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700208 "application": { # The application that created the session.
Craig Citroe633be12015-03-02 13:40:36 -0800209 "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.
210 "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.
211 "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.
212 "detailsUrl": "A String", # An optional URI that can be used to link back to the application.
213 },
214 "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000215 "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 -0800216 "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user.
217 "name": "A String", # A human readable name of the session.
218 }</pre>
219</div>
220
221</body></html>