-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathplayground.http
122 lines (93 loc) · 2.82 KB
/
playground.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
# This file is VSCode specific
# you must have "humao.rest-client" extension installed.
@host = http://localhost:3000
###
# @name login
POST {{host}}/api/dev_login
Content-Type: application/json
{
"email": "[email protected]"
}
###
POST {{host}}/api/send_magic_link
Content-Type: application/json
{
"email": "[email protected]",
"redirectURI": "http://localhost:3000/login-callback"
}
###
GET {{host}}/api/auth_user
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/token
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/users?search=&first=&after=
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/usernames?starting_with=&first=&after=
# Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/users/shinji
Authorization: Bearer {{login.response.body.token}}
###
PUT {{host}}/api/auth_user/avatar
Authorization: Bearer {{login.response.body.token}}
Content-Type: image/png
< assets/sample_avatar.png
###
POST {{host}}/api/users/rei/toggle_follow
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/users/shinji/followers?first=&after=
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/users/shinji/followees?first=&after=
Authorization: Bearer {{login.response.body.token}}
###
# @name createTimelineItem
POST {{host}}/api/timeline
Authorization: Bearer {{login.response.body.token}}
Content-Type: application/json
{
"content": "new post"
}
###
GET {{host}}/api/users/shinji/posts?last=&before=
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/posts/{{createPost.response.body.post.id}}
Authorization: Bearer {{login.response.body.token}}
###
POST {{host}}/api/posts/{{createPost.response.body.post.id}}/toggle_subscription
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/timeline?last=&before=
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/posts?last=&before=&tag=test
Authorization: Bearer {{login.response.body.token}}
###
# @name createComment
POST {{host}}/api/posts/{{createPost.response.body.post.id}}/comments
Authorization: Bearer {{login.response.body.token}}
Content-Type: application/json
{
"content": "new comment"
}
###
GET {{host}}/api/posts/{{createPost.response.body.post.id}}/comments?last=&before=
Authorization: Bearer {{login.response.body.token}}
###
# @name notifications
GET {{host}}/api/notifications?last=&before=
Authorization: Bearer {{login.response.body.token}}
###
GET {{host}}/api/has_unread_notifications
Authorization: Bearer {{login.response.body.token}}
###
POST {{host}}/api/notifications/{{notifications.response.body.0.id}}/mark_as_read
Authorization: Bearer {{login.response.body.token}}
###
POST {{host}}/api/mark_notifications_as_read
Authorization: Bearer {{login.response.body.token}}