Rodada de cases 3 - Pokemon Go API#65
Open
Aversii wants to merge 1 commit into
Open
Conversation
JessicaBMaya
approved these changes
Dec 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POKEMON - POKEMON GO API
O que é?
Aplicação backend em Node utilizando Express e Knex para manuseio de API REST
O que faz?
É possivel listar todos os pokemons, ou pega-los por ID. também é possível filtra-los e ordena-los. Paginação está disponível. Consulte a documentação anexa
Como rodar o projeto?
Clone o repositório
Rode "npm i" para instalar as dependências.
Configure as variaveis de ambiente para receber o banco de dados.
Rode "npm run migrations para criar e popular o banco de dados.
Rode "npm run dev" para começar utilizar a API
Have Fun :D
Documentação da API
//POKEMON GO - API DOCUMENTATION
// 1 - BASIC ENDPOINTS
// 1.1 - Get all pokemons
GET http://localhost:3003/pokemon
Content-Type: application/json
// 1.2- Get pokemon by id
GET http://localhost:3003/pokemon/id/1500
Content-Type: application/json
// 2 - Poke query - Our API supports some features. You can filter, sort and paginate .
// 2.1 - Filtering - its possible filter pokemons by name/type/generation using queries
GET http://localhost:3003/pokemon?name=dra&type=dragon&generation=1
Content-Type: application/json
// 2.2 - Sorting - is also possible sort by id,name,generation,type using query.
GET http://localhost:3003/pokemon?name=dra&type=dragon&generation=1&sort=name
Content-Type: application/json
// 2.2 - Ordering - is also possible order by asc or desc. Asc set as default value.
GET http://localhost:3003/pokemon?name=dra&type=dragon&generation=1&sort=name&order=desc
Content-Type: application/json
//2.3 Pagination - our API suports pagination using size for how much itens, and page to navigate between
GET http://localhost:3003/pokemon?size=20&page=2
Content-Type: application/json