Skip to content

API Documentation for Practice App Card By Name

Can edited this page May 12, 2023 · 1 revision

Card By Name - POST

  • Endpoint: /api/v1/games/card
  • Definition: Request a single card info from a third party Hearthstone API - Single Card and insert relevant (desired) information to database (CardByName schema)
  • Query Parameters: None
  • Body Data: card_name (required): string, userEmail (required): string
  • Example Request Query:
http://localhost:3001/api/v1/games/card
  • Example Request Body:
{
    "card_name":"Screaming Banshee",
    "userEmail":"[email protected]"
}
  • Example Response Body:
{
    "status": "success",
    "message": "Card info is inserted to database successfully"
}

Card By Name - GET

  • Endpoint: /api/v1/games/card
  • Definition: Returns the cards that are added to the database by the user with email as userEmail
  • Query Parameters: userEmail (required): string
  • Body Data: None
  • Example Request Query:
http://localhost:3001/api/v1/games/[email protected]
  • Example Request Body: None
  • Example Response Body:
[
    {
        "card_id": "RLK_715",
        "card_name": "Runeforging",
        "card_set": "Core",
        "user_email": "[email protected]",
        "createdAt": "2023-05-12T13:40:38.323Z"
    },
    {
        "card_id": "ETC_533",
        "card_name": "Mosh Pit",
        "card_set": "Festival of Legends",
        "user_email": "[email protected]",
        "createdAt": "2023-05-11T20:13:25.394Z"
    },
    {
        "card_id": "RLK_Prologue_066",
        "card_name": "Hematurge",
        "card_set": "March of the Lich King",
        "user_email": "[email protected]",
        "createdAt": "2023-05-11T20:08:23.165Z"
    },
    {
        "card_id": "ETC_522",
        "card_name": "Screaming Banshee",
        "card_set": "Festival of Legends",
        "user_email": "[email protected]",
        "createdAt": "2023-05-07T16:40:46.154Z"
    },
    {
        "card_id": "RLK_225",
        "card_name": "Blightfang",
        "card_set": "March of the Lich King",
        "user_email": "[email protected]",
        "createdAt": "2023-05-07T16:38:30.265Z"
    },
    {
        "card_id": "RLK_083",
        "card_name": "Deathchiller",
        "card_set": "Path of Arthas",
        "user_email": "[email protected]",
        "createdAt": "2023-05-07T12:02:45.979Z"
    },
    {
        "card_id": "RLK_516",
        "card_name": "Bone Breaker",
        "card_set": "Path of Arthas",
        "user_email": "[email protected]",
        "createdAt": "2023-05-07T11:57:59.138Z"
    }
]


💻 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