Skip to content

Commit 74b6fb2

Browse files
committed
update docs
1 parent a5f5cf8 commit 74b6fb2

21 files changed

+2002
-2
lines changed

.nojekyll

Whitespace-only changes.

README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
1-
# animeloop-doc
2-
Documentation for animeloop
1+
## Quick start
2+
3+
#### If you want to get a random loop
4+
5+
```bash
6+
curl https://animeloop.org/api/v2/random/loop
7+
```
8+
9+
#### If you need a random background video
10+
11+
```html
12+
<video loop="loop" autoplay="autoplay" muted="muted" webkit-playsinline="" playsinline="" preload="">
13+
<source src="http://animeloop.org/api/v2/rand/loop-720p.mp4" type="video/mp4">
14+
Your browser does not support the video tag.
15+
</video>
16+
```
17+

_navbar.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [En](/)
2+
- [中文](/zh-cn/)

_sidebar.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
- Getting started
2+
- [Quick start](/README)
3+
- [Demo](/demo)
4+
- Overview
5+
- [Global](/global)
6+
- Get Data
7+
- [Loop](/loop)
8+
- [Episode](/episode)
9+
- [Bangumi](/bangumi)
10+
- [Tag](/tag)
11+
- Others
12+
- [Old version API](/old-version)

bangumi.md

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
## Get one series by seriesid
2+
3+
**`GET /series[?id=value]`**
4+
5+
Example Request
6+
7+
```bash
8+
Get one series which seriesid is 592a63088e46ce684784a6b3
9+
curl https://animeloop.org/api/v2/series?id=592a63088e46ce684784a6b3
10+
```
11+
12+
Example Response
13+
14+
```json
15+
{
16+
"status": "success",
17+
"data": {
18+
"id": "592a63088e46ce684784a6b3",
19+
"title": "小魔女學院",
20+
"title_romaji": "Little Witch Academia (TV)",
21+
"title_english": "Little Witch Academia (TV)",
22+
"title_japanese": "リトルウィッチアカデミア (TV)",
23+
"description": "TV series of Little Witch Academia.",
24+
"genres": [
25+
"Adventure",
26+
"Comedy",
27+
"Fantasy"
28+
],
29+
"type": "TV",
30+
"total_episodes": 25,
31+
"anilist_id": 21858,
32+
"season": "2017-1",
33+
"image_url_large": "http://cdn.animeloop.org/files/anilist/21858/image_large.jpg"
34+
}
35+
}
36+
```
37+
38+
## Get a group of bangumi by querying
39+
40+
**`GET /series?[query=value, ...]`**
41+
42+
available query keys
43+
44+
| KEY | VALUE TYPE | EXAMPLE | DESCRIPTION |
45+
| ------ | ---------- | ---------------- | ---------------------------------------- |
46+
| type | String | OVA / TV / Movie | type of bangumi |
47+
| season | String | 2015-4 / 2018-1 | season of bangumi |
48+
| page | Number | 11 | bangumi on page N |
49+
| limit | Number | 20 | The number of bangumi per page(default 30) |
50+
51+
Example Request
52+
53+
```bash
54+
Get a group of bangumi on page 1 on January 2015(3 bangumi per page)
55+
curl https://animeloop.org/api/v1/series?season=2015-1
56+
```
57+
58+
Example Response
59+
60+
```json
61+
{
62+
"status": "success",
63+
"data": [
64+
{
65+
"id": "591b2b9868f9f00f82bf3640",
66+
"title": "幻想嘉年华",
67+
"title_romaji": "Carnival Phantasm",
68+
"title_english": "Carnival Phantasm",
69+
"title_japanese": "カーニバル・ファンタズム",
70+
"description": "Carnival Phantasm is an adaption of the manga \"Take Moon\" by Type-Moon's Eri Takenashi, to celebrate Type-Moon's 10th Anniversary.<br><br>\nCarnival Phantasm shows parodies and new stories loosely based on Type-Moon's original works like Melty Blood, Fate/Stay Night, Tsukihime, and more.",
71+
"genres": [
72+
"Comedy",
73+
"Supernatural"
74+
],
75+
"type": "OVA",
76+
"total_episodes": 12,
77+
"anilist_id": 10012,
78+
"season": "2011-8",
79+
"image_url_large": "http://cdn.animeloop.org/files/anilist/10012/image_large.jpg"
80+
},
81+
{
82+
"id": "592553f935b31b2fc80e7b67",
83+
"title": "真实之泪",
84+
"title_romaji": "True Tears",
85+
"title_english": "True Tears",
86+
"title_japanese": "True Tears",
87+
"description": "Shinichiro is a student living in what would be a dream come true for most high school boys, but for him is mostly a frustration. A well liked girl in school named Hiromi has lived in his house for a year along with his family. Her father was a close friend of the family, and when he died they immediately took her in. She is popular and well liked, always smiles, is talented in sports- but Shinichiro knows there must be tears inside her. Having an artistic tendency, he makes watercolours of her and thinks about wishing to ease her tears. Yet he cannot bring up the nerve to talk to her even in his own home. She, too, is quiet and withdrawn in their house, quite unlike at school. Shinichiro is also distracted by teasing from his friend Nobuse for watching Hiromi from afar, a curse of bad luck from a strange girl named Noe, and being forced to perform Muhiga dancing. By helping Noe he hopes to ease his own problems, yet he seems to have difficulty helping himself.<br><br>\n(Source: ANN)",
88+
"genres": [
89+
"Drama",
90+
"Romance"
91+
],
92+
"type": "TV",
93+
"total_episodes": 13,
94+
"anilist_id": 2129,
95+
"season": "2008-1",
96+
"image_url_large": "http://cdn.animeloop.org/files/anilist/2129/image_large.jpg"
97+
},
98+
{
99+
"id": "5925c2232ab64839a477b768",
100+
"title": "聲之形",
101+
"title_romaji": "Koe no Katachi",
102+
"title_english": "A Silent Voice",
103+
"title_japanese": "聲の形",
104+
"description": "I wish we had never met. I wish we could meet once again. A boy who can hear, Shoya Ishida, and a transfer student who can't, Shoko Nishimiya. One fateful day, the two meet, and Shoya leads the class in bullying Shoko. But before long, the class shifts its target from Shoko to Shoya. Years later, Shoya feels strongly that he must see Shoko once again.<br>\r\n<br>\r\n(Source: Crunchyroll)",
105+
"genres": [
106+
"Drama",
107+
"Romance"
108+
],
109+
"type": "Movie",
110+
"total_episodes": 1,
111+
"anilist_id": 20954,
112+
"season": "2016-9",
113+
"image_url_large": "http://cdn.animeloop.org/files/anilist/20954/image_large.jpg"
114+
}
115+
]
116+
}
117+
```

demo.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Web dynamic background
2+
3+
Live Demo: https://moeoverflow.com
4+
5+
Github: https://github.com/moeoverflow/moeoverflow

episode.md

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
## Get one episode by episodeid
2+
3+
**`GET /episode?[id=value]`**
4+
5+
Example Request
6+
7+
```bash
8+
Get one episode which episodeid is 591b2b9268f9f00f82bf35ba
9+
curl https://animeloop.org/api/v2/episode?id=591b2b9268f9f00f82bf35ba
10+
```
11+
12+
Example Response
13+
14+
```json
15+
{
16+
"status": "success",
17+
"data": {
18+
"id": "591b2b9268f9f00f82bf35ba",
19+
"no": "01",
20+
"series": {
21+
"id": "592a63088e46ce684784a6b3",
22+
"title": "小魔女學院",
23+
"title_romaji": "Little Witch Academia (TV)",
24+
"title_english": "Little Witch Academia (TV)",
25+
"title_japanese": "リトルウィッチアカデミア (TV)",
26+
"description": "TV series of Little Witch Academia.",
27+
"genres": [
28+
"Adventure",
29+
"Comedy",
30+
"Fantasy"
31+
],
32+
"type": "TV",
33+
"total_episodes": 25,
34+
"anilist_id": 21858,
35+
"season": "2017-1",
36+
"image_url_large": "http://cdn.animeloop.org/files/anilist/21858/image_large.jpg"
37+
}
38+
}
39+
}
40+
```
41+
42+
## Get a group of episodes by querying
43+
44+
**`GET /episode?[query=value, ...]`**
45+
46+
Avaliable query keys
47+
48+
| KEY | VALUE TYPE | EXAMPLE | DESCRIPTION |
49+
| -------- | ---------------- | ------------------------ | ---------------------------------------- |
50+
| seriesid | MongoDB ObjectId | 592a63088e46ce684784a6b3 | seriesid of episodes |
51+
| no | String | 01 / OVA / Movie | episode no |
52+
| full | Boolean | true / false | Whether to return complete episodes (including series) (default is false) |
53+
| page | Number | 11 | loops on page N (default: first page) |
54+
| limit | Number | 20 | The number of bangumi per page(default 30, max 100) |
55+
56+
Example Request
57+
58+
```bash
59+
Get a group of full episodes on first page (2 episodes per page) which seriesid is 592a63088e46ce684784a6b3
60+
curl https://animeloop.org/api/v2/episode?series=592a63088e46ce684784a6b3&full=true&limit=2
61+
```
62+
63+
Example Response
64+
65+
```json
66+
{
67+
"status": "success",
68+
"data": [
69+
{
70+
"id": "591b2b9268f9f00f82bf35ba",
71+
"no": "01",
72+
"series": {
73+
"id": "592a63088e46ce684784a6b3",
74+
"title": "小魔女學院",
75+
"title_romaji": "Little Witch Academia (TV)",
76+
"title_english": "Little Witch Academia (TV)",
77+
"title_japanese": "リトルウィッチアカデミア (TV)",
78+
"description": "TV series of Little Witch Academia.",
79+
"genres": [
80+
"Adventure",
81+
"Comedy",
82+
"Fantasy"
83+
],
84+
"type": "TV",
85+
"total_episodes": 25,
86+
"anilist_id": 21858,
87+
"season": "2017-1",
88+
"image_url_large": "http://cdn.animeloop.org/files/anilist/21858/image_large.jpg"
89+
}
90+
},
91+
{
92+
"id": "591b2b9268f9f00f82bf35bb",
93+
"no": "02",
94+
"series": {
95+
"id": "592a63088e46ce684784a6b3",
96+
"title": "小魔女學院",
97+
"title_romaji": "Little Witch Academia (TV)",
98+
"title_english": "Little Witch Academia (TV)",
99+
"title_japanese": "リトルウィッチアカデミア (TV)",
100+
"description": "TV series of Little Witch Academia.",
101+
"genres": [
102+
"Adventure",
103+
"Comedy",
104+
"Fantasy"
105+
],
106+
"type": "TV",
107+
"total_episodes": 25,
108+
"anilist_id": 21858,
109+
"season": "2017-1",
110+
"image_url_large": "http://cdn.animeloop.org/files/anilist/21858/image_large.jpg"
111+
}
112+
}
113+
]
114+
}
115+
```
116+

global.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
## BASEURL
2+
3+
**`https://animeloop.org/api/v2`**
4+
5+
## Global query keys
6+
7+
| KEY | VALUE TYPE | EXAMPLE | DESCRIPTION |
8+
| ---- | ---------- | ------------ | ----------------------- |
9+
| cdn | Boolean | true / false | 是否返回 CDN 资源链接(默认为 true) |
10+
11+
?> Currently, the cdn resource url is HTTP, the origin resource url is HTTPS
12+
13+
## Status code
14+
15+
| CODE | MESSAGE |
16+
| ---- | --------------------- |
17+
| 200 | request successfully |
18+
| 400 | request format error |
19+
| 500 | server internal error |
20+
21+
## Basic structure of Response JSON data
22+
23+
#### Success response
24+
25+
```json
26+
{
27+
"status": "success",
28+
"code": 200,
29+
"data": {...DATA...}
30+
}
31+
```
32+
33+
#### Error response
34+
35+
```json
36+
{
37+
"status": "error",
38+
"code": ERROR_CODE,
39+
"message": "...MESSAGE..."
40+
}
41+
```
42+
43+
#### Loop
44+
45+
```json
46+
{
47+
"id": MongoDB ObjectId,
48+
"duration": Number,
49+
"period": {
50+
"begin": Time String,
51+
"end": Time String
52+
},
53+
"frame": {
54+
"begin": Number,
55+
"end": Number
56+
},
57+
"sourceFrom": String,
58+
"uploadDate": Date String,
59+
"files": {
60+
"jpg_360p": URL,
61+
"mp4_360p": URL,
62+
"gif_360p": URL,
63+
"jpg_720p": URL,
64+
"mp4_720p": URL,
65+
"mp4_1080p": URL,
66+
"jpg_1080p": URL
67+
},
68+
"episodeid": MongoDB ObjectId,
69+
"seriesid": MongoDB ObjectId
70+
}
71+
```
72+
73+
#### Episode
74+
75+
```json
76+
{
77+
"id": MongoDB ObjectId,
78+
"no": String,
79+
"seriesid": MongoDB ObjectId
80+
}
81+
```
82+
83+
#### Series
84+
85+
```json
86+
{
87+
"id": MongoDB ObjectId,
88+
"title": String,
89+
"title_romaji": String,
90+
"title_english": String,
91+
"title_japanese": String,
92+
"description": String,
93+
"genres": [String],
94+
"type": String,
95+
"total_episodes": 12,
96+
"anilist_id": 10012,
97+
"season": String,
98+
"image_url_large": URL,
99+
"image_url_banner": URL
100+
}
101+
```
102+
103+
?> seriesid and episodeid can be replaced by series and episode details respectively.

0 commit comments

Comments
 (0)