|
|
@@ -11,6 +11,7 @@ Server for Integrated Project, powered by Express.js and Redis, listens only on
|
|
11
|
11
|
* [/user/register/](#userregister)
|
|
12
|
12
|
* [/user/auth/](#userauth)
|
|
13
|
13
|
* [/society/create/](#societycreate)
|
|
|
14
|
+ * [/society/view/](#societyview)
|
|
14
|
15
|
|
|
15
|
16
|
### Installation
|
|
16
|
17
|
Instructions are for OSX El Capitan at time of writing.
|
|
|
@@ -106,6 +107,7 @@ database and a response will be sent looking like this:
|
|
106
|
107
|
"name": "FooBarSociety",
|
|
107
|
108
|
"admins": ["FooBar", "BarFoo", "FarBoo"],
|
|
108
|
109
|
"description": "A description of the FooBarSociety society.",
|
|
|
110
|
+ "users": ["FooBar", "BarFoo", "FarBoo"] // At this point the users will simply be the admin list
|
|
109
|
111
|
}, // An object representing the society
|
|
110
|
112
|
"error": 0
|
|
111
|
113
|
}
|
|
|
@@ -114,3 +116,19 @@ The error codes are as follows, `1` indicates a malformed request, `2` indicates
|
|
114
|
116
|
that a society with that name already exists, and `3` indicates that the user
|
|
115
|
117
|
does not have authorisation to create that society. (Note that the admin list
|
|
116
|
118
|
must contain the username that is creating it.)
|
|
|
119
|
+
|
|
|
120
|
+### /society/view/:society\_name
|
|
|
121
|
+To view a created society, :society\_name, a `GET` request should be sent with
|
|
|
122
|
+no data. The response will then be formed as follows:
|
|
|
123
|
+```javascript
|
|
|
124
|
+{
|
|
|
125
|
+ "society": { // Society object containing information about the society
|
|
|
126
|
+ "name": "FooBarSociety",
|
|
|
127
|
+ "admins": ["FooBar", "BarFoo", "FarBoo"],
|
|
|
128
|
+ "description": "A description of the FooBarSociety society.",
|
|
|
129
|
+ "users": ["FooBar", "BarFoo", "FarBoo"]
|
|
|
130
|
+ },
|
|
|
131
|
+ "error": 0 // Error code if an error occured, 0 indicates no error.
|
|
|
132
|
+}
|
|
|
133
|
+```
|
|
|
134
|
+The error codes are as follows, `1` indicates that the society does not exist.
|