group¶
This endpoint is handled by group.views
-
GET
/api/group/
¶ This endpoint is handled by
group.views.GroupList()
Example request:
GET /api/group HTTP/1.1 Host: social.whs.in.th Accept: application/json, text/javascript Cookie: sessionid=.....
Example response:
HTTP/1.1 200 OK Content-Type: application/json X-Frame-Options: SAMEORIGIN Allow: GET, HEAD, OPTIONS [{"name":"test","description":"Description text","short_description":"Requirement to join group","activities":"Group activity text","type":0}]
Response JSON Array of Objects: - name (string) – Group name
- description (string) – What’s this group about
- short_description (string) – Requirement to join group
- type (int) – 0 = normal, 1 = classroom
Status Codes: - 401 Unauthorized – Not authenticated
-
GET
/api/group/
(int: id)¶ View basic information about a group
This endpoint is handled by
group.views.GroupViewDetail.get()
Example request:
GET /api/group/1 HTTP/1.1 Host: social.whs.in.th Accept: application/json, text/javascript Cookie: sessionid=.....
Example response:
HTTP/1.1 200 OK Content-Type: application/json X-Frame-Options: SAMEORIGIN Allow: GET, HEAD, OPTIONS {"name":"test","description":"Description text","short_description":"Requirement to join group","activities":"Group activity text","type":0,"member_status":-1}
Response JSON Object: - name (string) – Group name
- description (string) – What’s this group about
- short_description (string) – Requirement to join group
- type (int) – 0 = normal, 1 = classroom
- member_status (int) – -1 = not a member, 0 = request pending, 1 = member, 2 = administrator
Status Codes: - 404 Not Found – No such group