Skip to content

Commit b31f3e4

Browse files
authored
Focusmate (Independent Publisher) (#2018)
* Initial Focusmate Readme * Initial custom connector properties * Improve description * Readme wording
1 parent ec366a4 commit b31f3e4

File tree

3 files changed

+363
-0
lines changed

3 files changed

+363
-0
lines changed
Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
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+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"properties": {
3+
"connectionParameters": {
4+
"api_key": {
5+
"type": "securestring",
6+
"uiDefinition": {
7+
"displayName": "API Key",
8+
"description": "The API Key for this api",
9+
"tooltip": "Provide your API Key",
10+
"constraints": {
11+
"tabIndex": 2,
12+
"clearText": false,
13+
"required": "true"
14+
}
15+
}
16+
}
17+
},
18+
"iconBrandColor": "#da3b01",
19+
"capabilities": [],
20+
"publisher": "Phil Cole",
21+
"stackOwner": "focusmate.com"
22+
}
23+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Focusmate
2+
3+
Focusmate is a virtual co-working platform that helps you get things done by providing an accountability partner for 25 or 50-minute sessions dedicated to each attendee's focus area. This connector will allow you to retrieve your user information, your Focusmate sessions, and public information on your session partners.
4+
5+
## Publisher: Phil Cole
6+
7+
## Prerequisites
8+
9+
You have to create an account at Focusmate. You can sign up for free [here](https://focusmate.com). After you register, you will be then able to obtain your apiKey at the [Focusmate settings page](https://www.focusmate.com/profile/edit-p).
10+
11+
## Dates & Times
12+
13+
All the date and time values that occur in the API (both as query parameters and as returned payload fields) are **ISO8601 timestamps** according to **UTC timezone** e.g. `2018-08-24T08:24:48.652Z`.
14+
15+
## Supported Operations
16+
17+
### Get Profile
18+
19+
Gets the profile data for the calling user.
20+
21+
### Get Partner Profile
22+
23+
Gets the profile data for the given user id. Only publicly available data is returned.
24+
25+
### Sessions
26+
27+
Returns a list of sessions for the calling user.
28+
29+
* Sessions will be sorted in reverse chronological order (newest first)
30+
* The start parameter must be less than or equal than the end parameter
31+
* The time range provided must not exceed 1 year in length
32+
* Datetime parameters must be in ISO 8601 format and must specify an offset (or 'Z' for UTC)
33+
* All sessions partially within the given range will be returned
34+
* The 10-minute gap (5-minute for 25-minute sessions) after a session ends does not count as part of that session
35+
* Sessions whose start time matches the start parameter will be included
36+
* Sessions whose end time matches the end parameter will be included
37+
* Returned date-time values will always be in UTC
38+
* The calling user will always be the first user in the users array. Note that a number of fields are only available for the calling user
39+
* Canceled sessions are omitted
40+
41+
## Known Issues and Limitations
42+
43+
No issues and limitations are known at this time.
44+
45+
## Getting Started
46+
47+
You can visit [Focusmate API documentation](https://apidocs.focusmate.com/) to get even more information about the data returned by the actions (endpoints).
48+
49+
## Disclaimer
50+
51+
This connector is provided on a best-effort basis. If you face any issues, please let me know immediately!

0 commit comments

Comments
 (0)