forked from abramhindle/CMPUT404-project-socialdistribution
-
Notifications
You must be signed in to change notification settings - Fork 1
Author API
timvm1108 edited this page Mar 29, 2021
·
21 revisions
POST: api/<str:id>/ : author_object
Will perform an update on a specific author ID supplied in the path
GET: /authors
Description: Will return a list of all authors registered with the local server
Body: No Body Required
Sample Response:
[
{
"type": "author",
"id": "http://team6-project-socialdistrib.herokuapp.com/author/21d2d52bf3c34b84a45951d53b472a08",
"host": "team6-project-socialdistrib.herokuapp.com",
"displayName": "Jeff",
"url": "http://team6-project-socialdistrib.herokuapp.com/author/21d2d52bf3c34b84a45951d53b472a08",
"github": "https://github.com/Jeff/"
},
{
"type": "author",
"id": "http://team6-project-socialdistrib.herokuapp.com/author/6978b496f79d59fa9aa9648bf88dbaaf",
"host": "team6-project-socialdistrib.herokuapp.com",
"displayName": "Jim",
"url": "http://team6-project-socialdistrib.herokuapp.com/author/6978b496f79d59fa9aa9648bf88dbaaf",
"github": "https:/tim.com/"
}
]
{
"displayName": "Jon Snow",
"github": "https://github.com/jonsnow"
}
- On update and if a user is authorized
200 OKis returned - If unauthorized
403 FORBIDDENis returned