- Create an User
- Get a user using id
- Create a Post
- Get a post using id
- List all posts of a user
The user can create account using the API by going to '/users'. Supports only POST requests.
Returns user details using the API by going to ‘/users/{id}’. Supports only GET requests. Throws error if the user does not exist.
The user can create posts using the API by going to '/posts'. Supports only POST requests. Throws an error if the user with given ID does not exists.
Returns post content using the API by going to ‘/posts/{id}’. Supports only GET requests. Throws an error if the post with given ID does not exists.
Returns array containing all posts of a user using the API by going to ‘/posts/users/{id}’. Supports only GET requests. Throws an error if the user with given ID does not exists.
Added Unit Tests
- AddUserSuccess
- AddPostSuccess
- AddPostUnauthorized
- GetUser
- GetPost
- GetUserPosts