Skip to content

Backend Routes

egarrett3 edited this page Jul 27, 2020 · 1 revision

Backend Routes

HTML

  • GET "/" StaticPagesController#Root

API Endpoints

Users

  • GET /api/users/:id - return specific fan
  • GET /api/users/:user_id/artist/:id - return specific artist
  • POST /api/users/:id/artist - creates new artist
  • POST /api/users - creates new fan

Songs

  • GET /api/songs/:id - search for specific song
  • POST /api/songs - creates a song
  • DELETE /api/songs/:id - deletes a song
  • GET /api/albums/:id/ - get all songs of a particular album

Sessions

  • POST /api/session - logs in user
  • DELETE /api/session - logs out user

Albums

  • POST /api/albums - creates an album
  • DELETE /api/albums/:id/ - deletes an album
  • GET /api/albums/:id - get a specific album

Wishlist

  • POST /api/wishlist - adds to a list
  • DELETE /api/wishlist/:id - deletes from a list

Clone this wiki locally