Skip to content

API Documentation for Practice App Game By Category

Arda Kabadayı edited this page May 12, 2023 · 2 revisions

Game By Category - POST

  • Endpoint: /api/v1/games/category
  • Definition: Requests the data for the games from a third party API based on the given category and inserts them into the database
  • Query Parameters: None
  • Body Data: userEmail:string (it is required), category:string(it is required)
  • Example Request Query:
http://localhost:3001/api/v1/games/category
  • Example Request Body:
{
    "category":"superhero",
    "userEmail":"[email protected]"
}
  • Example Response Body:
{
    "status": "success",
    "message": "Games are inserted to database successfully"
}

Game By Category - GET

  • Endpoint: /api/v1/games/category
  • Definition: Returns the games 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: (There are 100 json objects in the response only two of them is shown in the example)
[
    {
        "user_email": "[email protected]",
        "category": "superhero",
        "games": [
            {
                "game_id": 525,
                "name": "MultiVersus",
                "short_description": "The Warner Bros lineup meets Smash in Player First Games’ MultiVersus.",
                "platform": "PC (Windows)",
                "publisher": "Warner Bros. Games",
                "developer": "Player First Games",
                "release_date": "2022-07-19",
                "_id": "645e161dd8d8b9a3c1ce5929"
            },
            {
                "game_id": 541,
                "name": "Marvel Snap",
                "short_description": "A fast paced strategy card game set in the Marvel universe.",
                "platform": "PC (Windows)",
                "publisher": "Nuverse",
                "developer": "Second Dinner Studios, Inc.",
                "release_date": "2022-10-18",
                "_id": "645e161dd8d8b9a3c1ce592a"
            },
            {
                "game_id": 453,
                "name": "Gotham City Impostors",
                "short_description": "A free to play multiplayer FPS that pits vigilantes dressed up like Batman against criminals dressed up like the Joker",
                "platform": "PC (Windows)",
                "publisher": "Warner Bros. Interactive Entertainment",
                "developer": "Monolith Productions, Inc.",
                "release_date": "2012-08-31",
                "_id": "645e161dd8d8b9a3c1ce592b"
            },
            {
                "game_id": 260,
                "name": "DC Universe Online",
                "short_description": "A free-to-play, comics based MMORPG set in the popular DC Comics universe.",
                "platform": "PC (Windows)",
                "publisher": "Daybreak Games",
                "developer": "Daybreak Games",
                "release_date": "2011-01-11",
                "_id": "645e161dd8d8b9a3c1ce592c"
            },
            {
                "game_id": 288,
                "name": "Champions Online",
                "short_description": "A superhero MMORPG created by the same studio behind City of Heroes.",
                "platform": "PC (Windows)",
                "publisher": "Perfect World Entertainment",
                "developer": "Cryptic Studios",
                "release_date": "2009-09-01",
                "_id": "645e161dd8d8b9a3c1ce592d"
            },
            {
                "game_id": 430,
                "name": "Urban Rivals",
                "short_description": "A free to play browser based card-game with a high player base and comic-book inspired world!",
                "platform": "Web Browser",
                "publisher": "Boostr ",
                "developer": "Acute Mobile",
                "release_date": "2006-01-17",
                "_id": "645e161dd8d8b9a3c1ce592e"
            }
        ],
        "createdAt": "2023-05-12T10:34:05.643Z"
    }
]


💻 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