blob: 57169eb11f808d0a63bd3b3b9cb4946cec58c807 [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#list">list(userId, activityType=None, endTime=None, includeDeleted=None, pageToken=None, startTime=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)
Bu Sun Kim65020912020-05-20 12:08:20 -070097 currentTimeMillis: string, The client&#x27;s current time in milliseconds since epoch.
Craig Citroe633be12015-03-02 13:40:36 -080098</pre>
99</div>
100
101<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code class="details" id="list">list(userId, activityType=None, endTime=None, includeDeleted=None, pageToken=None, startTime=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)
Bu Sun Kim65020912020-05-20 12:08:20 -0700107 activityType: integer, If non-empty, only sessions with these activity types should be returned. (repeated)
108 endTime: string, An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.
Craig Citroe633be12015-03-02 13:40:36 -0800109 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 -0700110 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 -0800111 startTime: string, An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.
Craig Citroe633be12015-03-02 13:40:36 -0800112
113Returns:
114 An object of the form:
115
116 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 &quot;deletedSession&quot;: [ # 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.
Craig Citroe633be12015-03-02 13:40:36 -0800118 { # Sessions contain metadata, such as a user-friendly name and time interval information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 &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
120 &quot;activityType&quot;: 42, # The type of activity this session represents.
121 &quot;application&quot;: { # The application that created the session.
122 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
123 &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.
124 &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.
125 &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.
Craig Citroe633be12015-03-02 13:40:36 -0800126 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700127 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
128 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
129 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
130 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
131 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
132 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
Craig Citroe633be12015-03-02 13:40:36 -0800133 },
134 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 &quot;hasMoreData&quot;: True or False, # Flag to indicate server has more data to transfer
136 &quot;nextPageToken&quot;: &quot;A String&quot;, # 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.
137 &quot;session&quot;: [ # Sessions with an end time that is between startTime and endTime of the request.
Craig Citroe633be12015-03-02 13:40:36 -0800138 { # Sessions contain metadata, such as a user-friendly name and time interval information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &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
140 &quot;activityType&quot;: 42, # The type of activity this session represents.
141 &quot;application&quot;: { # The application that created the session.
142 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
143 &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.
144 &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.
145 &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.
Craig Citroe633be12015-03-02 13:40:36 -0800146 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
148 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
149 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
150 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
151 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
152 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
Craig Citroe633be12015-03-02 13:40:36 -0800153 },
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:
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -0800168 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &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
184 &quot;activityType&quot;: 42, # The type of activity this session represents.
185 &quot;application&quot;: { # The application that created the session.
186 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
187 &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.
188 &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.
189 &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.
Craig Citroe633be12015-03-02 13:40:36 -0800190 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700191 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
192 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
193 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
194 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
195 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
196 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
Craig Citroe633be12015-03-02 13:40:36 -0800197}
198
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 currentTimeMillis: string, The client&#x27;s current time in milliseconds since epoch.
Craig Citroe633be12015-03-02 13:40:36 -0800200
201Returns:
202 An object of the form:
203
204 { # Sessions contain metadata, such as a user-friendly name and time interval information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700205 &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
206 &quot;activityType&quot;: 42, # The type of activity this session represents.
207 &quot;application&quot;: { # The application that created the session.
208 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
209 &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.
210 &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.
211 &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.
Craig Citroe633be12015-03-02 13:40:36 -0800212 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 &quot;description&quot;: &quot;A String&quot;, # A description for this session.
214 &quot;endTimeMillis&quot;: &quot;A String&quot;, # An end time, in milliseconds since epoch, inclusive.
215 &quot;id&quot;: &quot;A String&quot;, # A client-generated identifier that is unique across all sessions owned by this particular user.
216 &quot;modifiedTimeMillis&quot;: &quot;A String&quot;, # A timestamp that indicates when the session was last modified.
217 &quot;name&quot;: &quot;A String&quot;, # A human readable name of the session.
218 &quot;startTimeMillis&quot;: &quot;A String&quot;, # A start time, in milliseconds since epoch, inclusive.
Craig Citroe633be12015-03-02 13:40:36 -0800219 }</pre>
220</div>
221
222</body></html>