forked from abramhindle/CMPUT404-project-socialdistribution
-
Notifications
You must be signed in to change notification settings - Fork 1
Inbox API
Fraser Redford edited this page Mar 29, 2021
·
9 revisions
GET author/<str:author_id>/inbox
This will return all items sent to the author's inbox.
No body is required
{
"type": "inbox",
"author": "http://localhost:8000/author/42d2d52bf6c34b84a44951d53b472a08",
"items": [
{
"type": "Follow",
"summary": "ArthurShelby wants to follow TommyShelby",
"actor": {
"type": "author",
"id": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d",
"host": "team6-project-socialdistrib.herokuapp.com",
"displayName": "ArthurShelby",
"url": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d",
"github": "http://github.com/ArthurShelby"
},
"object": {
"type": "author",
"id": "https://team6-project-socialdistrib.herokuapp.com/author/42d2d52bf6c34b84a44951d53b472a08",
"host": "localhost:8000",
"displayName": "TommyShelby",
"url": "https://team6-project-socialdistrib.herokuapp.com/42d2d52bf6c34b84a44951d53b472a08",
"github": "https://github.com/TommyShelby"
}
},
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "ArthurShelby Likes your post",
"type": "like",
"author": {
"type": "author",
"id": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d",
"host": "team6-project-socialdistrib.herokuapp.com",
"displayName": "ArthurShelby",
"url": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d",
"github": "http://www.github.com/ArthurShelby"
},
"object": "https://team6-project-socialdistrib.herokuapp.com/author/42d2d52bf6c34b84a44951d53b472a08/posts/619900d6c2544c9899ab7f56452929db"
}
]
}
-
403- The requesting user is not allowed to view the inbox of this author. -
200- The requesting user is shown all items in the inbox of the provided author.
DELETE author/<str:author_id>/inbox
No body is required
No body is sent.
403 - The requesting user is not allowed to delete the inbox of this author.
200 - The requesting user deleted all items in the inbox of the provided author.