Skip to content

BolaGhaly/TTP-Capstone-Project-Backend

Repository files navigation

TTP Capstone Project - Backend (Server + Database)

Technologies Used

Custom Routes

🏀 Players Table
GET /players_cards
  • Description: Returns all players.


GET /players_cards/{id}
  • Parameter: id - Integer
  • Description: Returns a specific player based on the given id.
🔐 Users Table
POST /signup
  • Body:
    • username - String
    • email - String
    • password - String
    • accountBalance - Integer
  • Description: Creates and inserts a new user account with the given information into the database.


POST /login
  • Body:
    • email - String
    • password - String
  • Description: Allows a user to login with their existing account to gain access to our application by entering their email and password.


GET /users
  • Description: Returns all users.


GET /user/{id}
  • Parameter: id - Integer
  • Description: Returns a specific user based on the given id.


PUT /user/{id}
  • Parameter: id - Integer
  • Body:
    • accountBalance - Integer
  • Description: Updates a user's account balance based on the given id.


DELETE /user/{id}
  • Parameter: id - Integer
  • Description: Permanently deletes a user's account from the database based on the given id.
📔 Users Collections Table
POST /users_collection
  • Body:
    • userId - Integer
    • playerId - Integer
  • Description: Adds the player's card that a user receives from opening a pack/chest to their card collection.


GET /users_collection
  • Description: Returns all records that are in the users_collections table.


GET /users_collection/{id}
  • Parameter: id - Integer
  • Description: Returns a user's card collection based on the given id.


DELETE /users_collection/{id}
  • Parameter: id - Integer
  • Description: Permanently deletes a user's card collection based on the given id.

Releases

No releases published

Contributors