Skip to content

API Documentation for Practice App Games By Genre

Bilal Atım edited this page May 12, 2023 · 1 revision

Games By Genre - POST

  • Endpoint: /api/v1/games/genre
  • Definition: Requests the data for the specific genre from a third party API and inserts them into the database
  • Query Parameters: None
  • Body Data: userEmail:string (it is required) , genre_ID:number (it is required)
  • Example Request Query:
http://localhost:3001/api/v1/games/genre
  • Example Request Body:
{
    "genre_ID":4
    "userEmail":"[email protected]"
}
  • Example Response Body:
{
    "status": "success",
    "message": "Games by genre info is inserted into DB successfully"
}

Games By Genre - GET

  • Endpoint: /api/v1/games/genre
  • Definition: Returns information about the genres that are added to the database for the user with email as userEmail
  • Query Parameters: userEmail: string (it is required)
  • Body Data: None
  • Example Request Query:
http://localhost:3001/api/v1/games/[email protected]
  • Example Request Body: None
  • Example Response Body:
[
    {
    "genre_id": 4
    "genre_name": "Action"
    "games_count": 172448
    "image_background": "https://media.rawg.io/media/games/7cf/7cfc9220b401b7a300e409e539c9afd5.jpg"
    "game_description": "The action game is a genre that includes fights, puzzles, and strategies emphasizing coordination and reaction. It includes a large variety of sub-genres like fighting, beat 'em ups, shooters, survivals, mazes, and platforms; sometimes even multiplayer online battles and real-time strategies. Usually, the player performs as the protagonist with its unique abilities; some games add power-ups along the way. The character aims to complete levels, collect items, avoid obstacles, and battle against antagonists. It's necessary to avoid severe injuries during fights; if the health bar goes low, the player loses. Some games have an unbeatable number of enemies, and the only goal is to maximize score and survive for as long as possible. There might be a boss enemy who appears at the last level; he has unique abilities and a longer health bar. Pong is one of the first action games, released in 1972; the latest include Battlefield, Assasin's Creed, Fortnite and Dark Souls."
    "user_email": "a@a"
    }
]


💻 Meeting Notes

Cmpe 352
Cmpe 451

📝 Requirements


🪧 Diagrams


📬 Deliverables

Cmpe 352
Cmpe 451

🎇 General Contributions

Cmpe 352 Contributions

Milestone 1
Final Milestone

Cmpe 451 Contributions

Milestone 1
Milestone 2
Final Milestone

📕 Mock Up


🕵️ User Scenario



📝 RAM


📚 Research


📑 Templates


📱 Practice App

API Documentation for Practice App
Clone this wiki locally