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

Create Pokemon Info API and implement it on client #56

Closed
eidan66 opened this issue Sep 9, 2024 · 0 comments · Fixed by #57
Closed

Create Pokemon Info API and implement it on client #56

eidan66 opened this issue Sep 9, 2024 · 0 comments · Fixed by #57
Assignees
Labels
client server Backend code

Comments

@eidan66
Copy link
Owner

eidan66 commented Sep 9, 2024

We have this mock data and we need to create a new endpoint (api/pokemon/info/:id) that will return us the data and implement it on the client.

{
  id: 6,
  name: 'charizard',
  types: ['Fire', 'Flying'],
  about: {
    species: 'Flame Pokémon',
    height: 17, // decimetres (1.7m)
    weight: 905, // hectograms (90.5kg)
    abilities: [
      { name: 'Blaze', isHidden: false },
      { name: 'Solar Power', isHidden: true },
    ],
    gender: {
      male: 87.5,
      female: 12.5,
    },
    eggGroups: ['Monster', 'Dragon'],
    eggCycle: 'Steps to hatch: 5120', // (hatch_counter * 255)
  },
  baseStats: {
    hp: 78,
    attack: 84,
    defense: 78,
    specialAttack: 109,
    specialDefense: 85,
    speed: 100,
    total: 534,
  },
  evolutions: [
    {
      name: 'Charmander',
      level: 1,
      imageUrl:
        'https://raw.githubusercontent.com/eidan66/pokemon-api-sprites/master/sprites/pokemon/other/official-artwork/4.png',
    },
    {
      name: 'Charmeleon',
      level: 16,
      imageUrl:
        'https://raw.githubusercontent.com/eidan66/pokemon-api-sprites/master/sprites/pokemon/other/official-artwork/5.png',
    },
    {
      name: 'Charizard',
      level: 36,
      imageUrl:
        'https://raw.githubusercontent.com/eidan66/pokemon-api-sprites/master/sprites/pokemon/other/official-artwork/6.png',
    },
  ],
  megaEvolutions: [
    {
      name: 'Mega Charizard X',
      ability: 'Tough Claws',
      type: ['Fire', 'Dragon'],
      baseStats: {
        hp: 78,
        attack: 130,
        defense: 111,
        specialAttack: 130,
        specialDefense: 85,
        speed: 100,
        total: 634,
      },
      imageUrl:
        'https://raw.githubusercontent.com/eidan66/pokemon-api-sprites/master/sprites/pokemon/other/official-artwork/10034.png',
    },
    {
      name: 'Mega Charizard Y',
      ability: 'Drought',
      type: ['Fire', 'Flying'],
      baseStats: {
        hp: 78,
        attack: 104,
        defense: 78,
        specialAttack: 159,
        specialDefense: 115,
        speed: 100,
        total: 634,
      },
      imageUrl:
        'https://raw.githubusercontent.com/eidan66/pokemon-api-sprites/master/sprites/pokemon/other/official-artwork/10035.png',
    },
  ],
  moves: [
    {
      name: 'Flamethrower',
      type: 'Fire',
      power: 90,
      accuracy: 100,
      levelLearnedAt: 46,
    },
    {
      name: 'Dragon Claw',
      type: 'Dragon',
      power: 80,
      accuracy: 100,
      levelLearnedAt: 1,
    },
    {
      name: 'Air Slash',
      type: 'Flying',
      power: 75,
      accuracy: 95,
      levelLearnedAt: 62,
    },
    {
      name: 'Solar Beam',
      type: 'Grass',
      power: 120,
      accuracy: 100,
      levelLearnedAt: 56,
    },
  ],
};

Phase 1 - Implement without Mega evolution.

@eidan66 eidan66 added server Backend code client labels Sep 9, 2024
@eidan66 eidan66 self-assigned this Sep 9, 2024
@eidan66 eidan66 moved this to In Progress in Pokédex Client side Sep 9, 2024
@eidan66 eidan66 moved this to In Progress in Pokédex Server Side Sep 9, 2024
@eidan66 eidan66 linked a pull request Sep 9, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In Progress to Done in Pokédex Client side Sep 10, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Pokédex Server Side Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client server Backend code
Projects
Development

Successfully merging a pull request may close this issue.

1 participant