-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.http
147 lines (115 loc) · 11.3 KB
/
example.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
### Get users
GET http://localhost:3000/users
### Get user by id
GET http://localhost:3000/users/1
### Get user profile
GET http://localhost:3000/users/5f4b53995a6e92623abec455/profile
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjRiNTM5OTVhNmU5MjYyM2FiZWM0NTUiLCJpZCI6MSwiZW1haWwiOiJsdWZmeUBzYWlrb3UuY29tIiwiaWF0IjoxNTk4NzcyMTI2LCJleHAiOjE1OTkwMzEzMjZ9.03h-4I_viwK3GbIZeXgnAwYxnIOIcqtW5BlkNc-uTo4
### Register new user
POST http://localhost:3000/auth/register
Content-Type: application/json
{
"email": "luffy@saikou.com",
"password": "saikoucreator"
}
### Login
POST http://localhost:3000/auth/login
Content-Type: application/json
{
"email": "luffy@saikou.com",
"password": "saikoucreator"
}
### Logout
POST http://localhost:3000/auth/logout
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjRiNTM5OTVhNmU5MjYyM2FiZWM0NTUiLCJpZCI6MSwiZW1haWwiOiJsdWZmeUBzYWlrb3UuY29tIiwiaWF0IjoxNTk4NzcyMTI2LCJleHAiOjE1OTkwMzEzMjZ9.03h-4I_viwK3GbIZeXgnAwYxnIOIcqtW5BlkNc-uTo4
### Set Favorite Anime / Manga
PUT http://localhost:3000/users/5f41cda14c1f722f9ba7b8cd/profile
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjQxY2RhMTRjMWY3MjJmOWJhN2I4Y2QiLCJpZCI6OSwiZW1haWwiOiJsdWZmeUBzYWlrb3UuY29tIiwiaWF0IjoxNTk4MTQ4MDAzLCJleHAiOjE1OTg0MDcyMDN9.FuUyJhyPLFCpJQsDY34P_vyOgIiqLCsCvPQHV2SyKfE
Content-Type: application/json
{
"favoriteAnime": [17, 20, 5]
}
### Get all anime
GET http://localhost:3000/anime
### Get anime by id
GET http://localhost:3000/anime/24
### Add new anime
POST http://localhost:3000/anime
Content-Type: application/json
[{
"name": "Re:Zero kara Hajimeru Isekai Seikatsu",
"coverSrc": "/covers/anime_ReZero-kara-Hajimeru-Isekai-Seikatsu.png",
"coverAlt": "Re:Zero kara Hajimeru Isekai Seikatsu anime cover",
"slug": "rezero-kara-hajimeru-isekai-seikatsu",
"description": "<p>When Subaru Natsuki leaves the convenience store, the last thing he expects is to be wrenched from his everyday life and dropped into a fantasy world. Things aren't looking good for the bewildered teenager; however, not long after his arrival, he is attacked by some thugs. Armed with only a bag of groceries and a now useless cell phone, he is quickly beaten to a pulp. Fortunately, a mysterious beauty named Satella, in hot pursuit after the one who stole her insignia, happens upon Subaru and saves him. In order to thank the honest and kindhearted girl, Subaru offers to help in her search, and later that night, he even finds the whereabouts of that which she seeks. But unbeknownst to them, a much darker force stalks the pair from the shadows, and just minutes after locating the insignia, Subaru and Satella are brutally murdered.</p><p>However, Subaru immediately reawakens to a familiar scene—confronted by the same group of thugs, meeting Satella all over again—the enigma deepens as history inexplicably repeats itself.</p>",
"tagLine": "Normal boy without power but turning back time just like save point in games... albeit, by dying. Numerous depiction of 'death' really feels like... real"
},
{
"name": "Saiki Kusuo no Ψ-nan",
"coverSrc": "/covers/anime_Saiki-Kusuo-no-sainan.png",
"coverAlt": "Saiki Kusuo no Ψ-nan anime cover",
"slug": "saiki-kusuo-no-psi-nan",
"description": "<p>To the average person, psychic abilities might seem a blessing; for Kusuo Saiki, however, this couldn't be further from the truth. Gifted with a wide assortment of supernatural abilities ranging from telepathy to x-ray vision, he finds this so-called blessing to be nothing but a curse. As all the inconveniences his powers cause constantly pile up, all Kusuo aims for is an ordinary, hassle-free life—a life where ignorance is bliss.</p><p>Unfortunately, the life of a psychic is far from quiet. Though Kusuo tries to stay out of the spotlight by keeping his powers a secret from his classmates, he ends up inadvertently attracting the attention of many odd characters, such as the empty-headed Riki Nendou and the delusional Shun Kaidou. Forced to deal with the craziness of the people around him, Kusuo comes to learn that the ordinary life he has been striving for is a lot more difficult to achieve than expected.</p>",
"tagLine": "An hilarious low-energy gag comedy. It uses the power of 5 min attention span and high speed incantation dialogues to deliver a climax and a cliff hanger at once. Yare yare…."
},
{
"name": "Shingeki no Kyojin",
"coverSrc": "/covers/anime_Shingeki-no-Kyojin.png",
"coverAlt": "Shingeki no Kyojin anime cover",
"slug": "shingeki-no-kyojin",
"description": "<p>Centuries ago, mankind was slaughtered to near extinction by monstrous humanoid creatures called titans, forcing humans to hide in fear behind enormous concentric walls. What makes these giants truly terrifying is that their taste for human flesh is not born out of hunger but what appears to be out of pleasure. To ensure their survival, the remnants of humanity began living within defensive barriers, resulting in one hundred years without a single titan encounter. However, that fragile calm is soon shattered when a colossal titan manages to breach the supposedly impregnable outer wall, reigniting the fight for survival against the man-eating abominations.</p><p>After witnessing a horrific personal loss at the hands of the invading creatures, Eren Yeager dedicates his life to their eradication by enlisting into the Survey Corps, an elite military unit that combats the merciless humanoids outside the protection of the walls. Based on Hajime Isayama's award-winning anime, Shingeki no Kyojin follows Eren, along with his adopted sister Mikasa Ackerman and his childhood friend Armin Arlert, as they join the brutal war against the titans and race to discover a way of defeating them before the last walls are breached.</p>",
"tagLine": "On that day, mankind received a grim reminder. We lived in fear of the titans, and were disgraced to live in these cages we called walls."
}]
### Update anime data
PUT http://localhost:3000/anime/24
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjRiNTM5OTVhNmU5MjYyM2FiZWM0NTUiLCJpZCI6MSwiZW1haWwiOiJsdWZmeUBzYWlrb3UuY29tIiwiaWF0IjoxNTk4NzcyMTI2LCJleHAiOjE1OTkwMzEzMjZ9.03h-4I_viwK3GbIZeXgnAwYxnIOIcqtW5BlkNc-uTo4
Content-Type: application/json
{
"favorited": true
}
### Delete one anime
DELETE http://localhost:3000/anime/1
### Delete all anime
DELETE http://localhost:3000/anime
### Get all manga
GET http://localhost:3000/manga
### Get manga by id
GET http://localhost:3000/manga/10
### Add new manga
POST http://localhost:3000/manga
Content-Type: application/json
[{
"name": "Re:Zero kara Hajimeru Isekai Seikatsu",
"coverSrc": "/covers/anime_ReZero-kara-Hajimeru-Isekai-Seikatsu.png",
"coverAlt": "Re:Zero kara Hajimeru Isekai Seikatsu anime cover",
"slug": "rezero-kara-hajimeru-isekai-seikatsu",
"description": "<p>When Subaru Natsuki leaves the convenience store, the last thing he expects is to be wrenched from his everyday life and dropped into a fantasy world. Things aren't looking good for the bewildered teenager; however, not long after his arrival, he is attacked by some thugs. Armed with only a bag of groceries and a now useless cell phone, he is quickly beaten to a pulp. Fortunately, a mysterious beauty named Satella, in hot pursuit after the one who stole her insignia, happens upon Subaru and saves him. In order to thank the honest and kindhearted girl, Subaru offers to help in her search, and later that night, he even finds the whereabouts of that which she seeks. But unbeknownst to them, a much darker force stalks the pair from the shadows, and just minutes after locating the insignia, Subaru and Satella are brutally murdered.</p><p>However, Subaru immediately reawakens to a familiar scene—confronted by the same group of thugs, meeting Satella all over again—the enigma deepens as history inexplicably repeats itself.</p>",
"tagLine": "Normal boy without power but turning back time just like save point in games... albeit, by dying. Numerous depiction of 'death' really feels like... real"
},
{
"name": "Saiki Kusuo no Ψ-nan",
"coverSrc": "/covers/anime_Saiki-Kusuo-no-sainan.png",
"coverAlt": "Saiki Kusuo no Ψ-nan anime cover",
"slug": "saiki-kusuo-no-psi-nan",
"description": "<p>To the average person, psychic abilities might seem a blessing; for Kusuo Saiki, however, this couldn't be further from the truth. Gifted with a wide assortment of supernatural abilities ranging from telepathy to x-ray vision, he finds this so-called blessing to be nothing but a curse. As all the inconveniences his powers cause constantly pile up, all Kusuo aims for is an ordinary, hassle-free life—a life where ignorance is bliss.</p><p>Unfortunately, the life of a psychic is far from quiet. Though Kusuo tries to stay out of the spotlight by keeping his powers a secret from his classmates, he ends up inadvertently attracting the attention of many odd characters, such as the empty-headed Riki Nendou and the delusional Shun Kaidou. Forced to deal with the craziness of the people around him, Kusuo comes to learn that the ordinary life he has been striving for is a lot more difficult to achieve than expected.</p>",
"tagLine": "An hilarious low-energy gag comedy. It uses the power of 5 min attention span and high speed incantation dialogues to deliver a climax and a cliff hanger at once. Yare yare…."
},
{
"name": "Shingeki no Kyojin",
"coverSrc": "/covers/anime_Shingeki-no-Kyojin.png",
"coverAlt": "Shingeki no Kyojin anime cover",
"slug": "shingeki-no-kyojin",
"description": "<p>Centuries ago, mankind was slaughtered to near extinction by monstrous humanoid creatures called titans, forcing humans to hide in fear behind enormous concentric walls. What makes these giants truly terrifying is that their taste for human flesh is not born out of hunger but what appears to be out of pleasure. To ensure their survival, the remnants of humanity began living within defensive barriers, resulting in one hundred years without a single titan encounter. However, that fragile calm is soon shattered when a colossal titan manages to breach the supposedly impregnable outer wall, reigniting the fight for survival against the man-eating abominations.</p><p>After witnessing a horrific personal loss at the hands of the invading creatures, Eren Yeager dedicates his life to their eradication by enlisting into the Survey Corps, an elite military unit that combats the merciless humanoids outside the protection of the walls. Based on Hajime Isayama's award-winning manga, Shingeki no Kyojin follows Eren, along with his adopted sister Mikasa Ackerman and his childhood friend Armin Arlert, as they join the brutal war against the titans and race to discover a way of defeating them before the last walls are breached.</p>",
"tagLine": "On that day, mankind received a grim reminder. We lived in fear of the titans, and were disgraced to live in these cages we called walls."
}]
### Update manga data
PUT http://localhost:3000/manga/7
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjRiNTM5OTVhNmU5MjYyM2FiZWM0NTUiLCJpZCI6MSwiZW1haWwiOiJsdWZmeUBzYWlrb3UuY29tIiwiaWF0IjoxNTk4NzcyMTI2LCJleHAiOjE1OTkwMzEzMjZ9.03h-4I_viwK3GbIZeXgnAwYxnIOIcqtW5BlkNc-uTo4
Content-Type: application/json
{
"favorited": true
}
### Delete one manga
DELETE http://localhost:3000/manga/1
### Delete all manga
DELETE http://localhost:3000/manga