-
Notifications
You must be signed in to change notification settings - Fork 0
/
Readme.txt
97 lines (79 loc) · 2.36 KB
/
Readme.txt
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
# assignment
Flobiz assignment
** While providing auth token in http header the format should be like :
Authorization : Bearer <token>
signup {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/signup
form data (body) :{
"password": "abcdef",
"email" : "[email protected]",
"bio" : "req",
"gender" : "req",
"age" : "8",
"first_name" : "abc",
"last_name" : "def"
}
return value : auth token (required for authentication)
}
login {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/signup
form data(body) : {
"password": "abcdef",
"email" : "[email protected]",
}
return value : auth token (required for authentication)
}
// update user details, use auth token for respective user
updateUser{
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/updateuser/:email
form data (body) :{
"password": "abcdef",
"email" : "[email protected]",
"bio" : "req",
"gender" : "req",
"age" : "8",
"first_name" : "abc",
"last_name" : "def"
}
}
//get respective user profile
getUserDetails {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/user/:email
}
// post a blog , use auth token for respective user
post {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/post
form data (body) : {
title : req.body.title,
image_url : req.body.image_url,
description : req.body.description,
likeCount : 0,
commentCount : 0
}
}
getAllPost {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/feed
}
//get specific post by postId
getPost {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/ :post_id
}
// delete post use auth token for respective user
delete {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/delete/ :post_id
}
//comment on post use auth token of any user
comment {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/comment/ :post_id
form data (body) : {
"body" : "qwerty"
}
}
//like on post use auth token of any user
like {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/like/ :post_id
}
//unlike on post use auth token of any user
unlike {
url : https://us-central1-oldmonk-cc6c9.cloudfunctions.net/api/unlike/ :post_id
}