Routes - Paul-Ryan/catstarter GitHub Wiki

API Endpoints

  • GET / StaticPagesController#root - home

Frontend Routes

  • /signup - new user
  • /signin - new session
  • /users/:userId - show user, backed projects, rewards, authored projects
  • /projects - project list/explore
  • /projects/:projectId - a single project
  • /categories/ - browse categories
  • /categories/:categoryId - browse a single category

API endpoints

users

  • [POST] api/users: "users#create" (signup),
  • [POST] api/session: "sessions#create" (login),
  • [DELETE] api/session: "sessions#destroy" (logout)

projects

  • [GET] api/projects: "projects#index" returns a project project,
  • [POST] api/projects: "projects#create" creates a project,
  • [GET] api/projects/:projectId: "projects#show" returns a project,
  • [PATCH] api/projects/:projectId: "projects#update" edit a project,
  • [DELETE] api/projects/:projectId: "projects#destroy" delete a project

users

  • SHOW api/users/:userId - returns user information
  • POST api/users/ - sign up a new user
  • UPDATE api/users/:userId - change user info

rewards

  • SHOW /api/projects/:projectId/rewards - shows a project's rewards
  • POST /api/projects/:projectId/rewards - create a new reward
  • PATCH /api/projects/:projectId/rewards/:rewardId - edit a reward
  • DELETE /api/projects/:projectId/rewards/:rewardId - delete a reward

categories

  • GET /api/categories - lists categories
  • SHOW /api/categories/:categoryId - returns projects of a particular category

pledges

  • POST /api/projects/:projectId/pledges - create a new pledge
  • PATCH /api/projects/:projectId/pledges - update a pledge
  • DELETE /api/projects/:projectId/pledges - delete a pledge