All groups¶
-
GET /api/v1/groups
Retrieve the info of each group.
Example request¶
curl -i http://example.com/api/v1/groups \
-H 'If-None-Match: 2503eb9066af0aaef2274e8a7d158fd7'
Request headers¶
- If-None-Match:
Send a conditional request checking the
ETag
header.
Example response¶
HTTP/1.1 200 OK
Date: Tue, 28 Aug 2018 09:35:27 GMT
Server: WSGIServer/0.2 CPython/3.7.0
Content-Type: application/json
ETag: "ee0581f62afb372d5faea0092d674a87"
X-Frame-Options: SAMEORIGIN
Content-Length: 286
[
{
"id": 1,
"name": "Group",
"description": "An example group",
"website": "https://example.com",
"discord": "https://discord.me/examplegroup",
"twitter": "ExampleGroup",
"logo": "https://example.com/media/groups/1/logo.png",
"members": [
{
"id": 1,
"name": "John Doe",
"roles": ["Leader"],
"twitter": "JohnDoe_1234",
"discord": "John Doe#1234"
},
],
"series": [
{
"slug": "some-manga",
"title": "Some manga",
"aliases": ["Some mango"]
}
]
}
]
Response headers¶
- Date: The date of the request.
- Server: Information regarding the server.
- Content-Type: The content type of the response. (always application/json)
- ETag: The version identifier of the resource. Useful for caching responses.
- X-Frame-Options: Sent by Django’s clickjacking middleware.
- Content-Length: The size of the response body in bytes.
Response body¶
The response body is an array of JSON objects. Each object contains the following:
id (int) - The ID of the group.
name (string) - The name of the group.
description (string) - The group’s description.
website (string) - The group’s website.
discord (string) - The group’s Discord server.
twitter (string) - The group’s Twitter username.
logo (string) - The group’s logo.
members (array of object) - The group’s members. Each object contains the following:
- id (int) - The ID of the member.
- name (string) - The name of the member.
- roles (array of string) - The roles of the member.
- twitter (string) - The member’s Twitter username.
- discord (string) - The member’s Discord username and discriminator.
series (array of object) - The group’s series. Each object contains the following:
- slug (slug) - The slug of the series.
- title (string) - The title of the series.
- aliases (array of string) - Other names for the series.
Status Codes¶
- 200 OK - No error.
- 304 Not Modified - The request was conditional and the content hasn’t been modified.