|
|
@@ -16,6 +16,7 @@ Server for Integrated Project, powered by Express.js and Redis, listens only on
|
|
16
|
16
|
* [/society/create/](#societycreate)
|
|
17
|
17
|
* [/society/view/](#societyview)
|
|
18
|
18
|
* [/society/view/:society\_name](#societyviewsociety_name)
|
|
|
19
|
+ * [/society/join/](#societyjoin)
|
|
19
|
20
|
|
|
20
|
21
|
### Installation
|
|
21
|
22
|
Instructions are for OSX El Capitan at time of writing.
|
|
|
@@ -172,3 +173,21 @@ no data. The response will then be formed as follows:
|
|
172
|
173
|
}
|
|
173
|
174
|
```
|
|
174
|
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.
|