This repository has been archived by the owner on Apr 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
apiary.apib
286 lines (265 loc) · 9.85 KB
/
apiary.apib
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
HOST: http://api.campfiremanager.info/v3/
--- CampFireManager ---
---
This is the API documentation for the next generation of CampFireManager back-ends.
For more details about CampFireManager, take a look at http://campfiremanager.info
---
--
Event Resources
These resources are used to populate everything relating to the event
--
Explain the "Top Level" details about the event.
GET /event
> Accept: application/json
< 200
< Content-Type: application/json
{
"startdate": "2013-10-19",
"enddate":"2013-10-20",
"name": "OggCamp '13",
"latitude": 53.405851,
"longditude": -2.970503,
"address": "LJMU Art & Design Academy, Duckinfield Street, Liverpool, L3 5RB",
"summary": "OggCamp is an unconference focusing on Free Culture, Free Software and Creative Commons.",
"lastUpdate":2013-10-18 00:00:00,
"links": ["public": "http://example.campfiremanager.info", "joind.in": "http://joind.in/event/view/", "lanyrd": "http://lanyrd.com/2013/oggcamp/"]
}
Get the Room details
GET /room
> Accept: application/json
< 200
< Content-Type: application/json
{
[{"intRoomID": 1,"strRoomName": "Main Stage","intRoomSize": 400,"isLocked": TRUE,"lastUpdate":2013-10-18 00:00:00}],
[{"intRoomID": 2,"strRoomName": "Room 2","intRoomSize": 70,"isLocked": FALSE,"lastUpdate":2013-10-18 00:00:00}],
[{"intRoomID": 3,"strRoomName": "Room 3","intRoomSize": 40,"isLocked": FALSE,"lastUpdate":2013-10-18 00:00:00}],
[{"intRoomID": 4,"strRoomName": "Room 4","intRoomSize": 40,"isLocked": FALSE,"lastUpdate":2013-10-18 00:00:00}]
}
Get the Slot details
GET /slot
> Accept: application/json
< 200
< Content-Type: application/json
{
[{"intSlotID": 1,"startDate": "2013-10-19","startTime": "10:45:00","endDate": "2013-10-19","endTime": "11:00:00","defaultState": ["title": "Welcome Speech", "isLocked": "hard"],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 2,"startDate": "2013-10-19","startTime": "11:00:00","endDate": "2013-10-19","endTime": "11:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 3,"startDate": "2013-10-19","startTime": "12:00:00","endDate": "2013-10-19","endTime": "12:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 4,"startDate": "2013-10-19","startTime": "13:00:00","endDate": "2013-10-19","endTime": "13:55:00","defaultState": ["title": "Lunch/Geeknic", "isLocked": "soft"],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 5,"startDate": "2013-10-19","startTime": "14:00:00","endDate": "2013-10-19","endTime": "14:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 6,"startDate": "2013-10-19","startTime": "15:00:00","endDate": "2013-10-19","endTime": "15:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 7,"startDate": "2013-10-19","startTime": "16:00:00","endDate": "2013-10-19","endTime": "16:55:00","defaultState": ["title": "Live Show", "isLocked": "hard"],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 8,"startDate": "2013-10-20","startTime": "10:45:00","endDate": "2013-10-19","endTime": "11:00:00","defaultState": ["title": "Welcome Back", "isLocked": "hard"],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 9,"startDate": "2013-10-20","startTime": "11:00:00","endDate": "2013-10-19","endTime": "11:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 10,"startDate": "2013-10-20","startTime": "12:00:00","endDate": "2013-10-19","endTime": "12:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 11,"startDate": "2013-10-20","startTime": "13:00:00","endDate": "2013-10-19","endTime": "13:55:00","defaultState": ["title": "Lunch/Geeknic", "isLocked": "soft"],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 12,"startDate": "2013-10-20","startTime": "14:00:00","endDate": "2013-10-19","endTime": "14:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 13,"startDate": "2013-10-20","startTime": "15:00:00","endDate": "2013-10-19","endTime": "15:55:00","defaultState": [],"lastUpdate":2013-10-18 00:00:00}],
[{"intSlotID": 14,"startDate": "2013-10-20","startTime": "16:00:00","endDate": "2013-10-19","endTime": "16:55:00","defaultState": ["title": "RaffleCast", "isLocked": "hard"],"lastUpdate":2013-10-18 00:00:00}],
}
--
People
These requests return details on attending users
--
Get all users
GET /user
> Accept: application/json
< 200
< Content-Type: application/json
{
[{
"intUserID": 1,
"strUserName": "John Doe",
"arrLinks": {"Twitter": "http://twitter.com/example", "Blog": "http://example.com"},
"isSpeaker": true,
"isSupport": false,
"isAdmin": false
}],
[{
"intUserID": 2,
"strUserName": "Mr CFM Admin",
"arrLinks": {"project": "http://campfiremanager.info"},
"isSpeaker": false,
"isSupport": true,
"isAdmin": true
}],
[{
"intUserID": 3,
"strUserName": "Anonymous",
"arrLinks": {},
"isSpeaker": false,
"isSupport": false,
"isAdmin": false
}]
}
Get an individual user
GET /user/{id}
> Accept: application/json
< 200
< Content-Type: application/json
[{
"intUserID": 1,
"strUserName": "John Doe",
"arrLinks": {"Twitter": "http://twitter.com/example", "Blog": "http://example.com"},
"isSpeaker": true,
"isSupport": false,
"isAdmin": false
}]
Get only non-anonymous users
GET /user?anon=false
> Accept: application/json
< 200
< Content-Type: application/json
{
[{
"intUserID": 1,
"strUserName": "John Doe",
"arrLinks": {"Twitter": "http://twitter.com/example", "Blog": "http://example.com"},
"isSpeaker": true,
"isSupport": false,
"isAdmin": false
}],
[{
"intUserID": 2,
"strUserName": "Mr CFM Admin",
"arrLinks": {"project": "http://campfiremanager.info"},
"isSpeaker": false,
"isSupport": true,
"isAdmin": true
}]
}
Get the currently authenticated user
GET /user/me
> Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
> Accept: application/json
< 200
< Content-Type: application/json
[{
"intUserID": 1,
"strUserName": "John Doe",
"arrLinks": {"Twitter": "http://twitter.com/example", "Blog": "http://example.com"},
"isSpeaker": true,
"isSupport": false,
"isAdmin": false
}]
Update a user record
POST /user/{id}
> Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
> Accept: application/json
> Content-Type: application/json
{"strUserName":"John Q. Doe"}
< 200
< Content-Type: application/json
[{
"intUserID": 1,
"strUserName": "John Q. Doe",
"arrLinks": {"Twitter": "http://twitter.com/example", "Blog": "http://example.com"},
"isSpeaker": true,
"isSupport": false,
"isAdmin": false
}]
Add a link into a user record
POST /user/{id}/links
> Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
> Accept: application/json
> Content-Type: application/json
{"Facebook": "https://facebook.com/example"}
< 200
< Content-Type: application/json
[{
"intUserID": 1,
"strUserName": "John Q. Doe",
"arrLinks": {"Twitter": "http://twitter.com/example", "Blog": "http://example.com", "Facebook": "https://facebook.com/example"},
"isSpeaker": true,
"isSupport": false,
"isAdmin": false
}]
--
Talks
A conference is run for it's talks, and here we define how those talks should appear
--
List all talks
GET /talk
> Accept: application/json
< 200
< Content-Type: application/json
{
[
"intTalkID": 1,
"strTalkTitle": "Welcome talk",
"strTalkDescription": "An introduction to the event",
"intSlotID": 1,
"intRoomID": 1,
"intProposer": 1,
"arrPresenters": [1,2,3],
"arrLinks": ["Slides": "http://example.com", "joind.in": "https://joind.in/talk/view/1"],
"arrNamedAttendees": [4,5,6,7,8,9,10],
"intAnonymousAttendees": 14
],
[
"intTalkID": 2,
"strTalkTitle": "Welcome back",
"strTalkDescription": "An introduction to day two",
"intSlotID": 8,
"intRoomID": 1,
"intProposer": 1,
"arrPresenters": [1,2,3],
"arrLinks": ["joind.in": "https://joind.in/talk/view/2"],
"arrNamedAttendees": [4,5,6,7,8,9,10],
"intAnonymousAttendees": 9
],
[
"intTalkID": 3,
"strTalkTitle": "Live Show",
"strTalkDescription": "The usual live show!",
"intSlotID": 7,
"intRoomID": 1,
"intProposer": 2,
"arrPresenters": [2,3,4],
"arrLinks": ["joind.in": "https://joind.in/talk/view/3"],
"arrNamedAttendees": [1,5,6,7,8,9,10],
"intAnonymousAttendees": 50
]
}
List a specific talks
GET /talk/{id}
> Accept: application/json
< 200
< Content-Type: application/json
[
"intTalkID": 1,
"strTalkTitle": "Welcome talk",
"strTalkDescription": "An introduction to the event",
"intSlotID": 1,
"intRoomID": 1,
"intProposer": 1,
"arrPresenters": [1,2,3],
"arrLinks": ["Slides": "http://example.com", "joind.in": "https://joind.in/talk/view/1"],
"arrNamedAttendees": [4,5,6,7,8,9,10],
"intAnonymousAttendees": 14
]
Create a talk
While you can specify the other fields mentioned in the response (like intRoomID), some of these will be reset by processes on the server.
The fields suffixed "_ro" are server generated.
POST /talk
> Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
> Accept: application/json
> Content-Type: application/json
{"strTalkTitle": "Welcome talk", "strTalkDescription": "An introduction to the event", "intSlotID": 1}
< 200
< Content-Type: application/json
[
"intTalkID": 1,
"strTalkTitle": "Welcome talk",
"strTalkDescription": "An introduction to the event",
"intSlotID": 1,
"intRoomID": -1,
"intProposer": 1,
"arrPresenters": [],
"arrLinks": [],
"arrNamedAttendees_ro": [],
"intAnonymousAttendees_ro": 0
]
--
Attendees
The attendee is the lifeblood of CampFireManager
--