-
Notifications
You must be signed in to change notification settings - Fork 8
/
apiary.apib
148 lines (93 loc) · 4.47 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
FORMAT: 1A
HOST: http://www.nuswhispers.com/api/
# NUSWhispers API
REST API for NUSWhispers platform. Powered by Laravel backend.
# Group Confessions
## Confession Collection [/confessions/{?timestamp,count,offset}]
+ Parameters
+ timestamp: `1457257656` (number, optional) - Retrieve confessions up to this UNIX timestamp.
+ count: `10` (number, optional) - Number of confessions to retrieve. Maximum is `10` (default).
+ Default: `10`
+ offset: `0` (number, optional) - Skips a specified number of confessions.
### List Featured Confessions [GET]
+ Response 200 (application/json)
## Popular Confessions [/confessions/popular/{?timestamp,count,offset}]
+ Parameters
+ timestamp: `1457257656` (number, optional) - Retrieve confessions up to this UNIX timestamp.
+ count: `10` (number, optional) - Number of confessions to retrieve. Maximum is `10` (default).
+ Default: `10`
+ offset: `0` (number, optional) - Skips a specified number of confessions.
### List Popular Confessions [GET]
+ Response 200 (application/json)
## Recent Confessions [/confessions/recent/{?timestamp,count,offset}]
+ Parameters
+ timestamp: `1457257656` (number, optional) - Retrieve confessions up to this UNIX timestamp.
+ count: `10` (number, optional) - Number of confessions to retrieve. Maximum is `10` (default).
+ Default: `10`
+ offset: `0` (number, optional) - Skips a specified number of confessions.
### List Recent Confessions [GET]
+ Response 200 (application/json)
## Favourite Confessions [/confessions/favourites/{?timestamp,count,offset}]
+ Parameters
+ timestamp: `1457257656` (number, optional) - Retrieve confessions up to this UNIX timestamp.
+ count: `10` (number, optional) - Number of confessions to retrieve. Maximum is `10` (default).
+ Default: `10`
+ offset: `0` (number, optional) - Skips a specified number of confessions.
### List Favourite Confessions [GET]
+ Response 200 (application/json)
## Confessions by Category [/confessions/category/{category_id}/{?timestamp,count,offset}]
+ Parameters
+ category_id: `10` (number, required) - ID of the confession category.
+ timestamp: `1457257656` (number, optional) - Retrieve confessions up to this UNIX timestamp.
+ count: `10` (number, optional) - Number of confessions to retrieve. Maximum is `10` (default).
+ Default: `10`
+ offset: `0` (number, optional) - Skips a specified number of confessions.
### List Confessions by Category [GET]
+ Response 200 (application/json)
## Confessions by Tag [/confessions/tag/{slug}/{?timestamp,count,offset}]
+ Parameters
+ slug: `whattodo` (string, required) - Slug of the confession tag.
+ timestamp: `1457257656` (number, optional) - Retrieve confessions up to this UNIX timestamp.
+ count: `10` (number, optional) - Number of confessions to retrieve. Maximum is `10` (default).
+ Default: `10`
+ offset: `0` (number, optional) - Skips a specified number of confessions.
### List Confessions by Tag [GET]
+ Response 200 (application/json)
## Confessions by Search Term [/confessions/search/{query}/{?timestamp,count,offset}]
+ Parameters
+ query: `hello` (string) - Search query.
+ timestamp: `1457257656` (number, optional) - Retrieve confessions up to this UNIX timestamp.
+ count: `10` (number, optional) - Number of confessions to retrieve. Maximum is `10` (default).
+ Default: `10`
+ offset: `0` (number, optional) - Skips a specified number of confessions.
### List Confessions by Search Term [GET]
+ Response 200 (application/json)
## Confession [/confessions/{confession_id}]
+ Parameters
+ confession_id (number) - ID of the confession.
### View a Single Confession [GET]
+ Response 200 (application/json)
# Group Categories
## Categories Collection [/categories]
### List Categories [GET]
+ Response 200 (application/json)
## Category [/categories/{category_id}]
+ Parameters
+ category_id: `10` (number) - ID of the category.
### View a Category Detail [GET]
+ Response 200 (application/json)
# Group Tags
## Tags Collection [/tags]
### List Tags [GET]
+ Response 200 (application/json)
## Popular Tags [/tags/top/{num}]
+ Parameters
+ num: `5` (number, optional) - Number of top tags to return. Maximum is `20`.
+ Default: `5`
### List Popular Tags [GET]
+ Response 200 (application/json)
## Tag [/tags/{tag_id}]
+ Parameters
+ tag_id: `1` (number) - ID of the tag.
### View a Tag Detail [GET]
+ Response 200 (application/json)