Просмотр исходного кода

Update documentation for society joins

Matt Coles лет назад: 9
Родитель
Сommit
b494f23ec9
1 измененных файлов с 19 добавлено и 0 удалено
  1. 19 0
      README.md

+ 19 - 0
README.md

16
     * [/society/create/](#societycreate)
16
     * [/society/create/](#societycreate)
17
     * [/society/view/](#societyview)
17
     * [/society/view/](#societyview)
18
     * [/society/view/:society\_name](#societyviewsociety_name)
18
     * [/society/view/:society\_name](#societyviewsociety_name)
19
+    * [/society/join/](#societyjoin)
19
 
20
 
20
 ### Installation
21
 ### Installation
21
 Instructions are for OSX El Capitan at time of writing.
22
 Instructions are for OSX El Capitan at time of writing.
172
 }
173
 }
173
 ```
174
 ```
174
 The error codes are as follows, `1` indicates that the society does not exist.
175
 The error codes are as follows, `1` indicates that the society does not exist.
176
+
177
+### /society/join/
178
+To join a society, a `POST` request should be sent with the following data:
179
+```javascript
180
+{
181
+    "society": "TestSociety", // Society name here
182
+    "auth": "$2a$10$qjkvbcPZ4YC7/a/I0ZpTaeJp6auXjGrG9pgAdI3PP61u4CftQPSL2" // Auth key here
183
+}
184
+```
185
+The response is then formed as follows:
186
+```javascript
187
+{
188
+    "success": 1, // Indicates successfulness
189
+    "error": 0
190
+}
191
+```
192
+The error codes are as follows, `1` indicates that the user is already a member
193
+of that society and `2` indicates a malformed request.