forked from abramhindle/CMPUT404-project-socialdistribution
-
Notifications
You must be signed in to change notification settings - Fork 1
Author API
Fraser Redford edited this page Mar 29, 2021
·
21 revisions
Retrieves the author object specified by the id
No Body Required
{
"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"
}
Updates the author object specified by the id in the request URL
Field Name: Value: type (Optional) "author" id (Optional) Should be a HATEOAS URL containing the UUID of the author at the end, will not be updated host (Optional) The hostname of the authors server displayName (Required) Should be a unique string for the users name url (Optional) Should be the URL of the user on the server github (Required) Should be the GitHub URL of the user
{
"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"
}
Will return a list of all authors registered with the local server
No Body Required
[
{
"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