PGAccess (:3010)

Guilds

getGuild (get)

  • route: api/commands/guilds/getGuild
  • req:
    • params:
      • guildID
  • res:
    • 200: okay
      • JSON (optional)
        • guild: Guild
    • 422: invalid parameters
    • 500: internal error

History

addSongsToDB (post)

  • route: api/commands/history/addSongsToDB
  • req:
    • JSON:
      • QueueItems
  • res:
    • 200: okay
    • 422: invalid parameters
    • 500: internal error

Library

addSongToLibrary (post)

  • route: api/commands/library/addSongToLibrary
  • req:
    • params:
      • userID
    • JSON:
      • Song
  • res:
    • 200: okay
    • 422: invalid parameters
    • 500: internal error

Scores

updateScores (post)

  • route: api/commands/scores/updateScores
  • req:
    • JSON:
      • Scores ({heardBy, djID, listenerScore, djScore, guildID})
  • res:
    • 200: okay
    • 422: invalid parameters
    • 500: internal error

    Songs

addSongToDB (post)

  • route: api/commands/songs/addSongToDB
  • req:
    • JSON:
      • Song
  • res:
    • 200: okay
    • 422: invalid parameters
    • 500: internal error

addNewUserToDB (post)

  • route: api/commands/users/addNewUserToDB
  • req:
    • params:
      • userID
  • res:
    • 200: okay
      • JSON (optional)
        • user: User ({id, googleAuthToken, spotifyAuthToken})
    • 422: invalid parameters
    • 500: internal error