Skip to content

API Documentation for Practice App Yugioh Card

egeek259 edited this page May 11, 2023 · 1 revision

Functionality - POST

  • Endpoint: /api/v1/games/yugiohcard
  • Definition: Requests the data for a Yugioh card from a third party API and inserts them into the database
  • Query Parameters: None
  • Body Data: userEmail:string (it is required) , card_name:string (it is required)
  • Example Request Query:
http://localhost:3001/api/v1/games/yugiohcard
  • Example Request Body:
{
    "card_name" : "Dark Magician" ,
    "userEmail" : "[email protected]"
}
  • Example Response Body:
{
    "status": "success",
    "message": "Yugioh card info is inserted to database successfully"
}

Functionality - GET

  • Endpoint: api/v1/games/yugiohcard
  • Definition: Returns the information about the cards 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:
[
    {
        "card_id": "55144522",
        "card_name": "Pot of Greed",
        "card_type": "Spell Card",
        "user_email": "[email protected]",
        "createdAt": "2023-05-11T18:21:50.002Z"
    },
    {
        "card_id": "89943724",
        "card_name": "Elemental HERO Neos",
        "card_type": "Normal Monster",
        "user_email": "[email protected]",
        "createdAt": "2023-05-11T18:21:36.646Z"
    },
    {
        "card_id": "46986421",
        "card_name": "Dark Magician",
        "card_type": "Normal Monster",
        "user_email": "[email protected]",
        "createdAt": "2023-05-11T18:21:21.411Z"
    }
]


💻 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