generated from extratone/latte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoutineHubAPI.json
296 lines (218 loc) · 6.21 KB
/
RoutineHubAPI.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
openapi: 3.0.0
info:
title: RoutineHub
description: >-
# RoutineHubDocs - API
Root URL: `https://routinehub.co/api/v1/`
All API endpoints are based on the root url.
**Note:** This documentation is for v1 of the API. The new v2 has not been
released yet.
##### Table of Content
> * [Shortcut ID](#shortcut-id)
> * [API Key](#api-key)<br>
> * [Key Generation](#key-generation)<br>
> * [Revoke Key](#revoke-key)<br>
> * [Storage](#storage)<br>
> * [GET Endpoints](#get-endpoints)<br>
> * [List User Shortcuts](#list-user-shortcuts)<br>
> * [Get Latest Shortcut Version Info](#get-latest-shortcut-version)<br>
> * [POST Endpoints](#post-endpoints)<br>
> * [Create Shortcut version](#create-shortcut-version)<br>
> * [Publish Shortcut](#publish-shortcut)<br>
> * [Unpublish Shortcut](#unpublish-shortcut)<br>
## Shortcut ID
The <shortcut_id> is a numeric ID assigned to the shortcut on the site when
a new shortcut is created.
To find this ID after creating the shortcut on RoutineHub, tap/click on the
address bar and view the numeric ID value.
Example: https://routinehub.co/shortcut/7388/version/create<br>
RoutineHub Shortcut ID: 7388
-----
## API Key
### Key Generation
Where <api_key> is needed, the user has to generate the key. This can be
done from the RoutineHub settings page.
### Revoke Key
It is not currently possible to revoke a key, but if you generate a new key,
the old key will become invalid
### Storage
It is Preferred that this be stored locally to the user's system and not on
your servers anywhere.
----
## GET Endpoints
### List User Shortcuts
`GET 'api/v1/<api_key>/shortcuts'`
Simply retrieves a list of the user's shortcuts with their IDs and whether
it's published or not.
### Get Latest Shortcut Version Info
`GET 'api/v1/shortcuts/<shortcut_id>/versions/latest'`
Gets the latest version of a shortcut. No api key needed.
-----
## POST Endpoints
### Create Shortcut version
`POST 'api/v1/<api_key>/shortcuts/<shortcut_id>/versions/create'`
Creates a new version for a shortcut.
Parameters:<br>
'version' : The version number
'link' : Link to the shortcut on iCloud
'changes' : List of changes for this version
### Publish Shortcut
`POST 'api/v1/<api_key>/shortcuts/<shortcut_id>/publish'`
Changes the publish status of a shortcut to True.
### Unpublish Shortcut
`POST 'api/v1/<api_key>/shortcuts/<shortcut_id>/unpublish'`
Changes the publish status of a shortcut to False.
version: 1.0.0
servers:
- url: https://routinehub.co
components:
securitySchemes:
apikeyAuth:
type: http
scheme: apikey
security:
- apikeyAuth: []
paths:
/api/v1/{apikey}/shortcuts:
get:
tags:
- default
summary: Get User Shortcuts
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: apikey
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/api/v1/{apikey}/shortcuts/{shortcutid}/versions/latest:
get:
tags:
- default
summary: Get Latest Shortcut Version Info
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: apikey
in: path
schema:
type: string
required: true
- name: shortcutid
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/api/v1/api/v1/{apikey}/shortcuts/{shortcutid}/versions/create:
post:
tags:
- default
summary: Create Shortcut Version
requestBody:
content: {}
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: version
in: query
schema:
type: string
- name: link
in: query
schema:
type: string
- name: changes
in: query
schema:
type: string
- name: apikey
in: path
schema:
type: string
required: true
- name: shortcutid
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/api/v1/api/v1/{apikey}/shortcuts/{shortcutid}/publish:
post:
tags:
- default
summary: Publish Shortcut
requestBody:
content: {}
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/x-www-form-urlencoded
- name: apikey
in: path
schema:
type: string
required: true
- name: shortcutid
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/api/v1/api/v1/{apikey}/shortcuts/{shortcutid}/unpublish:
post:
tags:
- default
summary: Unpublish Shortcut
requestBody:
content: {}
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/x-www-form-urlencoded
- name: apikey
in: path
schema:
type: string
required: true
- name: shortcutid
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}