Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All cards search view (collection view) #5

Open
JonoSommers opened this issue Feb 25, 2025 · 0 comments
Open

All cards search view (collection view) #5

JonoSommers opened this issue Feb 25, 2025 · 0 comments

Comments

@JonoSommers
Copy link
Owner

JonoSommers commented Feb 25, 2025

Description:
The All Cards Search View (Collection View) allows users to view either the Pokémon or MTG collection. When the Pokémon or MTG button is clicked, the corresponding cards are fetched from the API and displayed as "posters" on the page. The page will also display the card type (Pokémon or MTG) at the top along with a Home button and a search bar.

Details:

  • Two buttons, Pokémon Collection and MTG Collection, allow users to view the corresponding collection.
  • Clicking on the Pokémon Collection button fetches data from the Pokémon API and displays the cards as "posters" on the page.
  • Clicking on the MTG Collection button fetches data from the MTG API and displays the cards as "posters" on the page.
  • The card type (Pokémon or MTG) is displayed at the top of the page.
  • The page includes a Home button and a Search Bar at the top.

Examples:

  • Response Body for Fetching Pokémon Cards (Example from Pokémon API):
{
  "cards": [
    {
      "id": 1,
      "name": "Pikachu",
      "type": "Pokemon",
      "image": "https://example.com/images/pikachu.png"
    },
    {
      "id": 2,
      "name": "Charmander",
      "type": "Pokemon",
      "image": "https://example.com/images/charmander.png"
    }
  ]
}
  • Response Body for Fetching MTG Cards (Example from MTG API):
{
  "cards": [
    {
      "id": 101,
      "name": "Black Lotus",
      "type": "Magic",
      "image": "https://example.com/images/black-lotus.png"
    },
    {
      "id": 102,
      "name": "Shivan Dragon",
      "type": "Magic",
      "image": "https://example.com/images/shivan-dragon.png"
    }
  ]
}

Acceptance Criteria:

  • There are two buttons on the page: Pokémon Collection and MTG Collection.
  • Clicking on the Pokémon Collection button fetches data from the Pokémon API and displays the cards as "posters" on the page.
  • Clicking on the MTG Collection button fetches data from the MTG API and displays the cards as "posters" on the page.
  • The top of the page displays the card type (Pokémon or MTG) along with a Home button and a Search Bar.
  • Each "poster" displays the card's name and image.
  • All interactions (button clicks, fetching data, displaying cards) work as expected and pass the tests.
Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant