Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 75 | <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 Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 81 | <code><a href="#delete">delete(userId, sessionId, currentTimeMillis=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 82 | <p class="firstline">Deletes a session specified by the given session ID.</p> |
| 83 | <p class="toc_element"> |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 84 | <code><a href="#list">list(userId, pageToken=None, activityType=None, includeDeleted=None, endTime=None, startTime=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 85 | <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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 90 | <code><a href="#update">update(userId, sessionId, body=None, currentTimeMillis=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 91 | <p class="firstline">Updates or insert a given session.</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 94 | <code class="details" id="close">close()</code> |
| 95 | <pre>Close httplib2 connections.</pre> |
| 96 | </div> |
| 97 | |
| 98 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 99 | <code class="details" id="delete">delete(userId, sessionId, currentTimeMillis=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 100 | <pre>Deletes a session specified by the given session ID. |
| 101 | |
| 102 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 103 | 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 Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 104 | sessionId: string, The ID of the session to be deleted. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 105 | currentTimeMillis: string, The client's current time in milliseconds since epoch. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 106 | x__xgafv: string, V1 error format. |
| 107 | Allowed values |
| 108 | 1 - v1 error format |
| 109 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 110 | </pre> |
| 111 | </div> |
| 112 | |
| 113 | <div class="method"> |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 114 | <code class="details" id="list">list(userId, pageToken=None, activityType=None, includeDeleted=None, endTime=None, startTime=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 115 | <pre>Lists sessions previously created. |
| 116 | |
| 117 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 118 | 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 Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 119 | 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 Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 120 | activityType: integer, If non-empty, only sessions with these activity types should be returned. (repeated) |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 121 | includeDeleted: boolean, If true, and if both startTime and endTime are omitted, session deletions will be returned. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 122 | 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. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 123 | 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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 124 | x__xgafv: string, V1 error format. |
| 125 | Allowed values |
| 126 | 1 - v1 error format |
| 127 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 128 | |
| 129 | Returns: |
| 130 | An object of the form: |
| 131 | |
| 132 | { |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 133 | "hasMoreData": 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. |
| 134 | "session": [ # Sessions with an end time that is between startTime and endTime of the request. |
| 135 | { # Sessions contain metadata, such as a user-friendly name and time interval information. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 136 | "description": "A String", # A description for this session. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 137 | "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 138 | "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 |
| 139 | "application": { # The application that created the session. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 140 | "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. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 141 | "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. |
| 142 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 143 | "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. |
| 144 | }, |
| 145 | "activityType": 42, # The type of activity this session represents. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 146 | "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user. |
| 147 | "name": "A String", # A human readable name of the session. |
| 148 | "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 149 | "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 150 | }, |
| 151 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 152 | "deletedSession": [ # 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. |
| 153 | { # Sessions contain metadata, such as a user-friendly name and time interval information. |
| 154 | "description": "A String", # A description for this session. |
| 155 | "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive. |
| 156 | "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 |
| 157 | "application": { # The application that created the session. |
| 158 | "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. |
| 159 | "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. |
| 160 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
| 161 | "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. |
| 162 | }, |
| 163 | "activityType": 42, # The type of activity this session represents. |
| 164 | "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user. |
| 165 | "name": "A String", # A human readable name of the session. |
| 166 | "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive. |
| 167 | "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified. |
| 168 | }, |
| 169 | ], |
| 170 | "nextPageToken": "A String", # 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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 171 | }</pre> |
| 172 | </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 | |
| 178 | Args: |
| 179 | previous_request: The request for the previous page. (required) |
| 180 | previous_response: The response from the request for the previous page. (required) |
| 181 | |
| 182 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 183 | A request object that you can call 'execute()' on to request the next |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 184 | page. Returns None if there are no more items in the collection. |
| 185 | </pre> |
| 186 | </div> |
| 187 | |
| 188 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 189 | <code class="details" id="update">update(userId, sessionId, body=None, currentTimeMillis=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 190 | <pre>Updates or insert a given session. |
| 191 | |
| 192 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 193 | userId: string, Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 194 | sessionId: string, The ID of the session to be created. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 195 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 196 | The object takes the form of: |
| 197 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 198 | { # Sessions contain metadata, such as a user-friendly name and time interval information. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 199 | "description": "A String", # A description for this session. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 200 | "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 201 | "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 |
| 202 | "application": { # The application that created the session. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 203 | "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. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 204 | "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. |
| 205 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 206 | "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. |
| 207 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 208 | "activityType": 42, # The type of activity this session represents. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 209 | "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user. |
| 210 | "name": "A String", # A human readable name of the session. |
| 211 | "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 212 | "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 213 | } |
| 214 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 215 | currentTimeMillis: string, The client's current time in milliseconds since epoch. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 216 | x__xgafv: string, V1 error format. |
| 217 | Allowed values |
| 218 | 1 - v1 error format |
| 219 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 220 | |
| 221 | Returns: |
| 222 | An object of the form: |
| 223 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 224 | { # Sessions contain metadata, such as a user-friendly name and time interval information. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 225 | "description": "A String", # A description for this session. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 226 | "endTimeMillis": "A String", # An end time, in milliseconds since epoch, inclusive. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 227 | "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 |
| 228 | "application": { # The application that created the session. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 229 | "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. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 230 | "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. |
| 231 | "detailsUrl": "A String", # An optional URI that can be used to link back to the application. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 232 | "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. |
| 233 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 234 | "activityType": 42, # The type of activity this session represents. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 235 | "id": "A String", # A client-generated identifier that is unique across all sessions owned by this particular user. |
| 236 | "name": "A String", # A human readable name of the session. |
| 237 | "startTimeMillis": "A String", # A start time, in milliseconds since epoch, inclusive. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 238 | "modifiedTimeMillis": "A String", # A timestamp that indicates when the session was last modified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 239 | }</pre> |
| 240 | </div> |
| 241 | |
| 242 | </body></html> |