-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.raml
437 lines (437 loc) · 16.6 KB
/
api.raml
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
#%RAML 0.8
title: Bufferapp
version: 1
baseUri: https://api.bufferapp.com/{version}/
mediaType: application/json
securitySchemes:
- oauth_2_0: !include securitySchemes/oauth_2_0.raml
schemas:
- user: !include schemas/user-schema.json
- profiles: !include schemas/profiles-schema.json
- profile: !include schemas/profile-schema.json
- schedules: !include schemas/schedules-schema.json
- schedules-update: !include schemas/schedules-update-schema.json
- update: !include schemas/update-schema.json
- updates-array: !include schemas/updates-array-schema.json
- interactions: !include schemas/interactions-schema.json
- reorder: !include schemas/reorder-schema.json
- shuffle: !include schemas/shuffle-schema.json
- newUpdate: !include schemas/newUpdate-schema.json
- individual-update: !include schemas/individual-update-schema.json
- share: !include schemas/share-schema.json
- shares: !include schemas/shares-schema.json
- configuration: !include schemas/configuration-schema.json
- success: !include schemas/success-schema.json
resourceTypes:
- standardResource: !include resourceTypes/standardResource.raml
securedBy: [ oauth_2_0 ]
/user{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: Returns a single user.
responses:
200:
body:
application/json:
schema: user
example: !include examples/user-example.json
/profiles{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: Returns an array of social media profiles connected to a users account.
responses:
200:
body:
application/json:
schema: profiles
example: !include examples/profiles-example.json
/profiles:
/{id}{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: Returns details of the single specified social media profile.
responses:
200:
body:
application/json:
schema: profile
example: !include examples/profile-example.json
/{id}:
/schedules{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: Returns details of the posting schedules associated with a social media profile.
responses:
200:
body:
application/json:
schema: schedules
example: !include examples/schedules-example.json
/schedules/update{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: |
"Set the posting schedules for the specified social media profile.
body:
application/x-www-form-urlencoded:
formParameters:
schedules:
description: Each item in the array is an individual posting schedule which consists of days and times to match the format return by the above method.
required: true
example: schedules[0][days][]=mon&
responses:
200:
body:
application/json:
schema: schedules-update
example: !include examples/schedules-update-example.json
/updates:
/pending{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: |
"Returns an array of updates that are currently in the buffer for an individual social media profile.
queryParameters:
page:
description: Specifies the page of status updates to receive. If not specified the first page of results will be returned.
type: integer
count:
description: Specifies the number of status updates to receive. If provided, must be between 1 and 100.
type: integer
since:
description: Specifies a unix timestamp which only status updates created after this time will be retrieved.
type: date
utc:
description: If utc is set times will be returned relative to UTC rather than the users associated timezone.
type: boolean
responses:
200:
body:
application/json:
schema: updates-array
example: !include examples/updates-array-example.json
/sent{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: |
Returns an array of updates that have been sent from the buffer for an individual social media profile.
queryParameters:
page:
description: Specifies the page of status updates to receive. If not specified the first page of results will be returned.
type: integer
count:
description: Specifies the number of status updates to receive. If provided, must be between 1 and 100.
type: integer
since:
description: Specifies a unix timestamp which only status updates created after this time will be retrieved.
type: date
utc:
description: If utc is set times will be returned relative to UTC rather than the users associated timezone.
type: boolean
responses:
200:
body:
application/json:
schema: updates-array
example: !include examples/updates-array-example.json
/reorder{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: |
Edit the order at which statuses for the specified social media profile will be sent out of the buffer.
body:
application/x-www-form-urlencoded:
formParameters:
order:
description: "An ordered array of status update id's. This can be a partial array in combination with the offset parameter or a full array of every update in the profiles Buffer."
type: integer
offset:
description: Specifies the number of status updates to receive. If provided, must be between 1 and 100.
type: integer
utc:
description: If utc is set times will be returned relative to UTC rather than the users associated timezone
type: boolean
responses:
200:
body:
application/json:
schema: reorder
example: !include examples/reorder-example.json
/shuffle{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: |
Randomize the order at which statuses for the specified social media profile will be sent out of the buffer.
body:
application/x-www-form-urlencoded:
formParameters:
count:
description: Specifies the number of status updates to receive. If provided, must be between 1 and 100.
type: integer
utc:
description: If utc is set times will be returned relative to UTC rather than the users associated timezone
type: boolean
responses:
200:
body:
application/json:
schema: shuffle
example: !include examples/shuffle-example.json
/updates:
/{id}{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: Returns a single social media update.
responses:
200:
body:
application/json:
schema: update
example: !include examples/update-example.json
/{id}:
/interactions{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: |
Returns the detailed information on individual interactions with the social media update such as favorites, retweets and likes.
queryParameters:
event:
description: |
Specifies a type of event to be retrieved, for example "retweet", "like", "comment", "mention" or "reshare". They can also be plural (e.g., "reshares"). Plurality has no effect other than visual semantics. See /info/configuration for more information on supported interaction events.
required: true
page:
description: Specifies the page of status updates to receive. If not specified the first page of results will be returned.
type: integer
count:
description: Specifies the number of status updates to receive. If provided, must be between 1 and 100.
type: integer
responses:
200:
body:
application/json:
schema: interactions
example: !include examples/interactions-example.json
/update{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: |
Edit an existing, individual status update.
body:
application/x-www-form-urlencoded:
formParameters:
text:
description: The status update text.
required: true
now:
description: |
If now is set, this update will be sent immediately to all profiles instead of being added to the buffer.
type: boolean
media:
description: |
An associative array of media to be attached to the update, currently accepts link, description, title and picture parameters.
scheduled_at:
description: |
A date describing when the update should be posted. Overrides any top or now parameter.
When using ISO 8601 format, if no UTC offset is specified, UTC is assumed.
utc:
description: |
If utc is set times will be returned relative to UTC rather than the users associated timezone
type: boolean
responses:
200:
body:
application/json:
schema: individual-update
example: !include examples/individual-update-example.json
/share{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: Immediately shares a single pending update and recalculates times for updates remaining in the queue.
responses:
200:
body:
application/json:
schema: success
example: !include examples/share-example.json
/destroy{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: Permanently delete an existing status update.
responses:
200:
body:
application/json:
schema: success
example: !include examples/share-example.json
/move_to_top{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: Move an existing status update to the top of the queue and recalculate times for all updates in the queue. Returns the update with its new posting time.
responses:
200:
body:
application/json:
schema: update
example: !include examples/update-example.json
/create{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
post:
description: |
Create one or more new status updates.
body:
application/x-www-form-urlencoded:
formParameters:
text:
description: The status update text.
required: true
profile_ids[]:
description: |
An array of profile id's that the status update should be sent to. Invalid profile_id's will be silently ignored
required: true
shorten:
description: |
If shorten is false links within the text will not be automatically shortened, otherwise they will
type: boolean
now:
description: |
If now is set, this update will be sent immediately to all profiles instead of being added to the buffer.
type: boolean
top:
description: |
If top is set, this update will be added to the top of the buffer and will become the next update sent
type: boolean
media:
description: |
An associative array of media to be attached to the update, currently accepts link, description, title and picture parameters.
scheduled_at:
description: |
A date describing when the update should be posted. Overrides any top or now parameter.
When using ISO 8601 format, if no UTC offset is specified, UTC is assumed.
utc:
description: |
If utc is set times will be returned relative to UTC rather than the users associated timezone
type: boolean
responses:
200:
body:
application/json:
schema: newUpdate
example: !include examples/newUpdate-example.json
/links/shares{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: Returns an object with a the numbers of shares a link has had using Buffer.
queryParameters:
url:
description: URL-encoded URL of the page for which the number of shares is requested.
required: true
example: http%3A%2F%2Fbufferapp.com
responses:
200:
body:
application/json:
schema: shares
example: !include examples/shares-example.json
/info/configuration{mediaTypeExtension}:
type: standardResource
uriParameters:
mediaTypeExtension:
displayName: mediaTypeExtension
required: true
enum: [ .json ]
get:
description: Returns an object with the current configuration that Buffer is using, including supported services, their icons and the varying limits of character and schedules.
responses:
200:
body:
application/json:
schema: configuration
example: !include examples/configuration-example.json
documentation:
- title: Headline
content: !include docs/headline.md