Skip to content
Stephen Pangburn edited this page Sep 8, 2017 · 4 revisions

API Endpoints

JSON API

users

  • POST /api/users
  • PATCH /api/users/:id

session

  • POST /api/session
  • DELETE /api/session

stories

  • GET /api/stories
  • POST /api/stories
  • GET /api/stories/:id
  • PATCH /api/stories/:id
  • DELETE /api/stories/:id

comments

  • A story's comments will be displayed in the show template for that story
  • POST /api/comments
  • GET /api/comments/:postId: get all comments for a particular post
  • POST /api/comments/:postId: add comment to a post by id
  • DELETE /api/comments/:id
  • GET /api/comments/:userId: get all comments for a user(?)

follows

  • GET /api/follows/:followerId: get all follows for a user
  • GET /api/follows/:followeeId: get all followers for a user
  • POST /api/follows
  • DELETE /api/follows/:id

likes

  • GET /api/likes/:userId: get all likes for a user
  • GET /api/likes/:postId: get all likes for a post
  • POST /api/likes
  • DELETE /api/likes/id

Frontend Routes

Path Component
"/signup" "LoginModalContainer"
"/login" "LoginModalContainer"
"/:userId/:postId" "StoryContainer"
"/feed" "FeedContainer"
"/stories/new" "StoryFormContainer"
Clone this wiki locally