This repository has been archived by the owner on Mar 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Phase II: A Simple HTTPS Server
Kumin In edited this page Oct 21, 2016
·
23 revisions
GET /api/v1/login
POST /api/v1/login
GET /api/v1/user/id/:id
GET /api/v1/user/email/:email
Retrieves the user information based on the Facebook ID or Email provided depending on the route API endpoint.
Name | Type | Description |
---|---|---|
id | String | A User's facebook ID |
String | A User's email address |
Response: 200
{
"_id": "5807f1f75e22d052a7fd7994",
"name": "Kumin In",
"email": "[email protected]",
"profilePhotoURL": "graph.facebook.com/example_id/picture",
"__v": 0,
"pendingFriends": [],
"friends": [],
"facebook": {
"id": "example_id"
}
}
GET /api/v1/user/id/:id/publicKey
PUT /api/v1/user/id/:id/publicKey
PUT /api/v1/user/friend/accept
PUT /api/v1/user/friend/decline
PUT /api/v1/user/friend/add
GET /api/1/conversation
Retrieves All of the User's conversation.
Name | Type | Description |
---|
Response: 200
[
{
"_id": "Aaron_IDKumin_ID",
"date": "2016-10-19T23:26:15.234Z",
"__v": 2,
"message": [
{
"message": "hey man how are you doing?",
"from": "Aaron Turner",
"date": "2016-10-19T22:58:13.564Z",
"_id": "5807fa85df31ad5bde8b2582"
},
{
"message": "I'm doing fine. We're wrecking this project.",
"from": "Kumin In",
"date": "2016-10-19T23:13:20.497Z",
"_id": "5807fe10bd56f65f33e8c85f"
},
{
"message": "Hermdad was here!",
"from": "Kumin In",
"date": "2016-10-19T23:26:15.234Z",
"_id": "58080117a6e859636442b90c"
}
],
"members": [
"Aaron_ID",
"Kumin_ID"
]
}
]
PUT /api/v1/conversation
POST /api/v1/conversation
Kumin In, Aaron Turner. CECS 478. 2016