|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "title": "Focusmate", |
| 5 | + "description": "Get data on your Focusmate user, sessions and partners.", |
| 6 | + "contact": { |
| 7 | + "name": "Phil Cole", |
| 8 | + "url": "https://philcole.org", |
| 9 | + "email": "filcole@gmail.com" |
| 10 | + }, |
| 11 | + "version": "1.0" |
| 12 | + }, |
| 13 | + "x-ms-connector-metadata": [ |
| 14 | + { |
| 15 | + "propertyName": "Website", |
| 16 | + "propertyValue": "https://www.focusmate.com/" |
| 17 | + }, |
| 18 | + { |
| 19 | + "propertyName": "Privacy policy", |
| 20 | + "propertyValue": "https://blog.focusmate.com/privacy/" |
| 21 | + }, |
| 22 | + { |
| 23 | + "propertyName": "Categories", |
| 24 | + "propertyValue": "Productivity;Collaboration" |
| 25 | + } |
| 26 | + ], |
| 27 | + "host": "api.focusmate.com", |
| 28 | + "basePath": "/", |
| 29 | + "schemes": ["https"], |
| 30 | + "consumes": [], |
| 31 | + "produces": [], |
| 32 | + "paths": { |
| 33 | + "/v1/me": { |
| 34 | + "get": { |
| 35 | + "responses": { |
| 36 | + "200": { |
| 37 | + "description": "OK", |
| 38 | + "schema": { |
| 39 | + "type": "object", |
| 40 | + "properties": { |
| 41 | + "user": { |
| 42 | + "type": "object", |
| 43 | + "properties": { |
| 44 | + "userId": { |
| 45 | + "type": "string", |
| 46 | + "format": "uuid", |
| 47 | + "description": "Unique identifier for the current user", |
| 48 | + "title": "User Id" |
| 49 | + }, |
| 50 | + "name": { |
| 51 | + "type": "string", |
| 52 | + "description": "Name of the current user", |
| 53 | + "title": "Name" |
| 54 | + }, |
| 55 | + "totalSessionCount": { |
| 56 | + "type": "integer", |
| 57 | + "format": "int32", |
| 58 | + "description": "Total number of session for the current user", |
| 59 | + "title": "Total Session Count" |
| 60 | + }, |
| 61 | + "timeZone": { |
| 62 | + "type": "string", |
| 63 | + "description": "Time zone of the current user", |
| 64 | + "title": "Time zone" |
| 65 | + }, |
| 66 | + "photoUrl": { |
| 67 | + "type": "string", |
| 68 | + "format": "uri", |
| 69 | + "description": "Photo URL of the current user", |
| 70 | + "title": "Photo URL" |
| 71 | + } |
| 72 | + }, |
| 73 | + "description": "user" |
| 74 | + } |
| 75 | + } |
| 76 | + }, |
| 77 | + "headers": { |
| 78 | + "Content-Type": { |
| 79 | + "description": "Content-Type", |
| 80 | + "type": "string", |
| 81 | + "x-ms-visibility": "internal" |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | + }, |
| 86 | + "summary": "Get My Profile", |
| 87 | + "description": "Get profile data for the calling user", |
| 88 | + "operationId": "Profile", |
| 89 | + "parameters": [] |
| 90 | + } |
| 91 | + }, |
| 92 | + "/v1/users/{userId}": { |
| 93 | + "get": { |
| 94 | + "responses": { |
| 95 | + "200": { |
| 96 | + "description": "OK", |
| 97 | + "schema": { |
| 98 | + "type": "object", |
| 99 | + "properties": { |
| 100 | + "user": { |
| 101 | + "type": "object", |
| 102 | + "properties": { |
| 103 | + "userId": { |
| 104 | + "type": "string", |
| 105 | + "format": "uuid", |
| 106 | + "description": "The unique identifier of the specified user", |
| 107 | + "title": "User Id" |
| 108 | + }, |
| 109 | + "name": { |
| 110 | + "type": "string", |
| 111 | + "description": "Name of the specified user", |
| 112 | + "title": "Name" |
| 113 | + }, |
| 114 | + "totalSessionCount": { |
| 115 | + "type": "integer", |
| 116 | + "format": "int32", |
| 117 | + "description": "Total number of session for the specified user", |
| 118 | + "title": "Total Session Count" |
| 119 | + }, |
| 120 | + "timeZone": { |
| 121 | + "type": "string", |
| 122 | + "description": "Time zone of the specified user", |
| 123 | + "title": "Time zone" |
| 124 | + }, |
| 125 | + "photoUrl": { |
| 126 | + "type": "string", |
| 127 | + "format": "uri", |
| 128 | + "description": "Photo URL of the specified user", |
| 129 | + "title": "Photo URL" |
| 130 | + } |
| 131 | + }, |
| 132 | + "description": "Public information about the specified user" |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + "headers": { |
| 137 | + "Content-Type": { |
| 138 | + "description": "Content-Type", |
| 139 | + "type": "string", |
| 140 | + "x-ms-visibility": "internal" |
| 141 | + } |
| 142 | + } |
| 143 | + } |
| 144 | + }, |
| 145 | + "operationId": "PartnerProfile", |
| 146 | + "description": "Get profile data for the given userId. Only publicly available data is returned", |
| 147 | + "summary": "Get Partner Profile", |
| 148 | + "parameters": [ |
| 149 | + { |
| 150 | + "name": "userId", |
| 151 | + "in": "path", |
| 152 | + "required": true, |
| 153 | + "type": "string", |
| 154 | + "description": "User Id of the user who's profile will be retrieved.", |
| 155 | + "x-ms-summary": "User ID", |
| 156 | + "x-ms-visibility": "important", |
| 157 | + "x-ms-url-encoding": "single" |
| 158 | + } |
| 159 | + ] |
| 160 | + } |
| 161 | + }, |
| 162 | + "/v1/sessions": { |
| 163 | + "get": { |
| 164 | + "responses": { |
| 165 | + "200": { |
| 166 | + "description": "OK", |
| 167 | + "schema": { |
| 168 | + "type": "object", |
| 169 | + "properties": { |
| 170 | + "sessions": { |
| 171 | + "type": "array", |
| 172 | + "items": { |
| 173 | + "type": "object", |
| 174 | + "properties": { |
| 175 | + "sessionId": { |
| 176 | + "type": "string", |
| 177 | + "format": "uuid", |
| 178 | + "description": "Unique identifier for a session", |
| 179 | + "title": "Session Id" |
| 180 | + }, |
| 181 | + "duration": { |
| 182 | + "type": "integer", |
| 183 | + "format": "int32", |
| 184 | + "description": "Duration of the session (milliseconds)", |
| 185 | + "title": "Duration" |
| 186 | + }, |
| 187 | + "startTime": { |
| 188 | + "type": "string", |
| 189 | + "format": "date-time", |
| 190 | + "description": "Start time of the session (UTC)", |
| 191 | + "title": "Start Time" |
| 192 | + }, |
| 193 | + "users": { |
| 194 | + "type": "array", |
| 195 | + "items": { |
| 196 | + "type": "object", |
| 197 | + "properties": { |
| 198 | + "userId": { |
| 199 | + "type": "string", |
| 200 | + "format": "uuid", |
| 201 | + "description": "The user id of a user within the session", |
| 202 | + "title": "User Id" |
| 203 | + }, |
| 204 | + "requestedAt": { |
| 205 | + "type": "string", |
| 206 | + "format": "date-time", |
| 207 | + "description": "Date and time the session was requested (UTC)", |
| 208 | + "title": "Requested At" |
| 209 | + }, |
| 210 | + "joinedAt": { |
| 211 | + "type": "string", |
| 212 | + "format": "date-time", |
| 213 | + "description": "Date and time the user joined the session (UTC)", |
| 214 | + "title": "Joined At" |
| 215 | + }, |
| 216 | + "completed": { |
| 217 | + "type": "boolean", |
| 218 | + "description": "Indicates the session was completed", |
| 219 | + "title": "Completed" |
| 220 | + }, |
| 221 | + "sessionTitle": { |
| 222 | + "type": "string", |
| 223 | + "description": "Session Title", |
| 224 | + "title": "Session Title" |
| 225 | + } |
| 226 | + } |
| 227 | + }, |
| 228 | + "description": "List of users in a session" |
| 229 | + } |
| 230 | + } |
| 231 | + }, |
| 232 | + "description": "List of sessions within time range" |
| 233 | + } |
| 234 | + } |
| 235 | + }, |
| 236 | + "headers": { |
| 237 | + "Content-Type": { |
| 238 | + "description": "Content-Type", |
| 239 | + "type": "string", |
| 240 | + "x-ms-visibility": "internal" |
| 241 | + } |
| 242 | + } |
| 243 | + } |
| 244 | + }, |
| 245 | + "summary": "Get Sessions", |
| 246 | + "description": "Returns a list of sessions for the calling user.", |
| 247 | + "operationId": "GetSessions", |
| 248 | + "parameters": [ |
| 249 | + { |
| 250 | + "name": "start", |
| 251 | + "in": "query", |
| 252 | + "required": true, |
| 253 | + "type": "string", |
| 254 | + "format": "date", |
| 255 | + "description": "The start date and time from which sessions will be retrieved", |
| 256 | + "x-ms-summary": "Start Date", |
| 257 | + "x-ms-visibility": "important" |
| 258 | + }, |
| 259 | + { |
| 260 | + "name": "end", |
| 261 | + "in": "query", |
| 262 | + "required": true, |
| 263 | + "type": "string", |
| 264 | + "format": "date", |
| 265 | + "description": "The end date and time up to which sessions will be retrieved", |
| 266 | + "x-ms-summary": "End Date", |
| 267 | + "x-ms-visibility": "important" |
| 268 | + } |
| 269 | + ] |
| 270 | + } |
| 271 | + } |
| 272 | + }, |
| 273 | + "definitions": {}, |
| 274 | + "parameters": {}, |
| 275 | + "responses": {}, |
| 276 | + "securityDefinitions": { |
| 277 | + "API Key": { |
| 278 | + "type": "apiKey", |
| 279 | + "in": "header", |
| 280 | + "name": "X-API-KEY" |
| 281 | + } |
| 282 | + }, |
| 283 | + "security": [ |
| 284 | + { |
| 285 | + "API Key": [] |
| 286 | + } |
| 287 | + ], |
| 288 | + "tags": [] |
| 289 | +} |
0 commit comments