-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuffer-openapi-spec.yaml
308 lines (291 loc) · 7.18 KB
/
buffer-openapi-spec.yaml
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
swagger: '2.0'
info:
title: Buffer OpenAPI Spec
description: |
OpenAPI Spec for Buffer, handcrafted by [Rodolfo Carvalho](http://rodolfocarvalho.net).
**Note**: This is not an official spec. This is not endorsed by Buffer.
version: 1.0.0
license:
name: MIT License
url: https://github.com/rhcarvalho/buffer-openapi-spec/blob/master/LICENSE
externalDocs:
description: Official Buffer API documentation
url: https://buffer.com/developers/api
host: api.bufferapp.com
basePath: '/1'
schemes:
- https
consumes:
- application/x-www-form-urlencoded
produces:
- application/json
tags:
- name: auth
description: Authentication with Buffer is the first step in building your app.
externalDocs:
url: https://buffer.com/developers/api/oauth
- name: user
description: A user represents a single Buffer user account.
externalDocs:
url: https://buffer.com/developers/api/user
- name: profiles
description: A Buffer profile represents a connection to a single social media account.
externalDocs:
url: https://buffer.com/developers/api/profiles
securityDefinitions:
Bearer:
# header must be set to "Authorization: Bearer ${AccessToken}"
type: apiKey
in: header
name: Authorization
security:
- Bearer: []
paths:
/oauth2/token.json:
post:
summary: Getting an Access Token
security: []
parameters:
- in: formData
name: client_id
required: true
type: string
- in: formData
name: client_secret
required: true
type: string
- in: formData
name: redirect_uri
required: true
type: string
- in: formData
name: code
required: true
type: string
- in: formData
name: grant_type
required: true
type: string
enum: [authorization_code]
responses:
200:
description: >
If your request is successful we will return a long-lived access
token which can be used to access the users account details for
all further api requests.
schema:
type: object
properties:
access_token:
type: string
tags:
- auth
/user.json:
get:
summary: Returns a single user.
responses:
200:
description: Returns a single user.
schema:
$ref: '#/definitions/User'
tags:
- user
/user/deauthorize.json:
post:
summary: Deauthorize your client for the user.
responses:
200:
description: Deauthorize your client for the user.
schema:
type: object
properties:
success:
type: boolean
message:
type: string
example:
success: true
message: Access successfully revoked!
tags:
- user
/profiles.json:
get:
summary: Returns an array of social media profiles connected to a users account.
responses:
200:
description: Returns an array of social media profiles connected to a users account.
schema:
type: array
items:
$ref: '#/definitions/Profile'
tags:
- profiles
/profiles/{id}.json:
get:
summary: Returns details of the single specified social media profile.
parameters:
- in: path
name: id
required: true
type: string
responses:
200:
description: Returns details of the single specified social media profile.
schema:
$ref: '#/definitions/Profile'
tags:
- profiles
/profiles/{id}/schedules.json:
get:
summary: Returns details of the posting schedules associated with a social media profile.
parameters:
- in: path
name: id
required: true
type: string
responses:
200:
description: Returns details of the posting schedules associated with a social media profile.
schema:
type: array
items:
$ref: '#/definitions/Schedule'
tags:
- profiles
/profiles/{id}/schedules/update.json:
post:
summary: Set the posting schedules for the specified social media profile.
parameters:
- in: path
name: id
required: true
type: string
responses:
200:
description: Set the posting schedules for the specified social media profile.
tags:
- profiles
definitions:
User:
type: object
properties:
# '_id' is the same as 'id'; ommited because it is unnecessary and because
# it causes swagger-codegen to generate broken clients.
#_id:
# type: string
id:
type: string
activity_at:
type: integer
format: int32
created_at:
type: integer
format: int32
plan:
type: string
timezone:
type: string
example:
_id: '4f0c0a06512f7ef214000000'
activity_at: 1343654640
created_at: 1326189062
id: '4f0c0a06512f7ef214000000'
plan: free
timezone: Asia/Tel_Aviv
Profile:
type: object
properties:
avatar:
type: string
created_at:
type: integer
format: int32
default:
type: boolean
formatted_username:
type: string
id:
type: string
schedules:
type: array
items:
$ref: '#/definitions/Schedule'
service:
type: string
service_id:
type: string
service_username:
type: string
statistics:
type: object
properties:
followers:
type: integer
format: int32
team_members:
type: array
items:
type: string
timezone:
type: string
user_id:
type: string
example:
avatar: 'http://a3.twimg.com/profile_images/1405180232.png'
created_at: 1320703028
default: true
formatted_username: '@skinnyoteam'
id: '4eb854340acb04e870000010'
schedules:
- days:
- mon
- tue
- wed
- thu
- fri
times:
- '12:00'
- '17:00'
- '18:00'
service: twitter
service_id: '164724445'
service_username: skinnyoteam
statistics:
followers: 246
team_members:
- '4eb867340acb04e670000001'
timezone: Europe/London
user_id: '4eb854340acb04e870000010'
Schedule:
type: object
properties:
days:
type: 'array'
items:
type: 'string'
enum:
- 'mon'
- 'tue'
- 'wed'
- 'thu'
- 'fri'
- 'sat'
- 'sun'
times:
type: 'array'
items:
type: 'string'
required:
- days
- times
example:
days:
- mon
- tue
- wed
- thu
- fri
times:
- '12:00'
- '17:00'
- '18:00'