-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
Adding a Node via admin panel, create user for that node object but you can leave the "approve" that user account to false, basic-auth still works with unapproved accounts. Deleting the node will delete the associated user too.
Node will also store a textual form of the id and password to connect and gain access to the foreign node.
For posts and comments in the GET URL one can also provide page and size.
If a page is provided, it returns the results for that page, if no page is provided it returns page 0.
If a size is provided, it returns pages in this size up to the maximum set on the server. If no size is provided it returns the default page size.
Examples:
GET http://cmput404f16t04dev.herokuapp.com/api/author/posts?page=4&size=50GET http://cmput404f16t04dev.herokuapp.com/api/author/posts?page=4GET http://cmput404f16t04dev.herokuapp.com/api/author/posts/de305d54-75b4-431b-adb2-eb6b9e546013/comments?page=4&size=50GET http://cmput404f16t04dev.herokuapp.com/api/author/posts/de305d54-75b4-431b-adb2-eb6b9e546013/comments?page=4
Single Post Access: GET /api/posts/{post_id}
Public Posts Access: GET /api/posts/
Author Visible Posts Access: GET /api/author/posts/
Posts by Author Access: GET /api/author/{AUTHOR_ID}/posts/
Comments Access: GET /api/posts/{POST_ID}/comments
Image Access: GET /api/images/{IMAGE_ID}/
Author's Profile Access: GET /api/author/{AUTHOR_ID}
Friends List Access: GET /api/friends/{authorid}
Check Friendship Access: GET /api/friends/{authorid1}/{authorid2}
Check List Friendship Access: POST /api/friends/{authorid}
Friend Request Access: POST /api/friendrequest
Note that all of the above endpoints are appended to the host name of the server. EG: When running locally, they would (probably) be appended to '127.0.0.1:8000', such as '127.0.0.1:8000/api/posts'. At the time of writing, the application is available at 'http://cmput404f16t04dev.herokuapp.com' as well.