|
|
@@ -13,6 +13,8 @@ Server for Integrated Project, powered by Express.js and Redis, listens only on
|
|
13
|
13
|
* [/hello/:name/](#helloname)
|
|
14
|
14
|
* [/user/register/](#userregister)
|
|
15
|
15
|
* [/user/auth/](#userauth)
|
|
|
16
|
+ * [/user/view/](#userview)
|
|
|
17
|
+ * [/user/view/:user](#userviewuser)
|
|
16
|
18
|
* [/society/create/](#societycreate)
|
|
17
|
19
|
* [/society/view/](#societyview)
|
|
18
|
20
|
* [/society/view/:society\_name](#societyviewsociety_name)
|
|
|
@@ -93,6 +95,27 @@ existing authentication key for that account. Note that you do not need to use
|
|
93
|
95
|
The error codes are as follows, `1` indicates the username or password was
|
|
94
|
96
|
invalid and `2` indicates that the login request was malformed.
|
|
95
|
97
|
|
|
|
98
|
+### /user/view/
|
|
|
99
|
+As yet unimplemented but will eventually return all of the users.
|
|
|
100
|
+
|
|
|
101
|
+### /user/view/:user
|
|
|
102
|
+To view the public information for any given `:user`, a `GET` request should be
|
|
|
103
|
+sent with no data, and the returned response will look like this:
|
|
|
104
|
+```javascript
|
|
|
105
|
+{
|
|
|
106
|
+ "user": {
|
|
|
107
|
+ "username": "test1",
|
|
|
108
|
+ "societies": [
|
|
|
109
|
+ "TestSociety2"
|
|
|
110
|
+ ],
|
|
|
111
|
+ "friends": [],
|
|
|
112
|
+ "accepted_events": []
|
|
|
113
|
+ },
|
|
|
114
|
+ "error": 0
|
|
|
115
|
+}
|
|
|
116
|
+```
|
|
|
117
|
+The error codes are as follows, `1` indicates that the user does not exist.
|
|
|
118
|
+
|
|
96
|
119
|
### /society/create/
|
|
97
|
120
|
To create a new society, a `POST` request should be sent with the following
|
|
98
|
121
|
data:
|