Giter Site home page Giter Site logo

pokedex's Introduction

README

  • Ruby version 3.0.3

  • Rails version 7.0.1

  • Configuration bundle install

  • Database creation rails db:setup

  • How to run the test suite rails test

Usage

Index

GET / | GET /?page=1&per_page=30

{ "pokemons": [
    { "id": 1, "number": 1, "name": "Bulbasaur", "type1": "Grass", "type2": "Poison", "total": 318, "hp": 45, "attack": 49, "defense": 49, "spAtk": 65, "spDef": 65, "speed": 45, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.543Z", "updated_at": "2022-02-03T17: 46: 46.543Z" }, 
    { "id": 2, "number": 2, "name": "Ivysaur", "type1": "Grass", "type2": "Poison", "total": 405, "hp": 60, "attack": 62, "defense": 63, "spAtk": 80, "spDef": 80, "speed": 60, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.558Z", "updated_at": "2022-02-03T17: 46: 46.558Z" }, 
    { "id": 3, "number": 3, "name": "Venusaur", "type1": "Grass", "type2": "Poison", "total": 525, "hp": 80, "attack": 82, "defense": 83, "spAtk": 100, "spDef": 100, "speed": 80, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.576Z", "updated_at": "2022-02-03T17: 46: 46.576Z" }, 
    { "id": 4, "number": 3, "name": "VenusaurMega Venusaur", "type1": "Grass", "type2": "Poison", "total": 625, "hp": 80, "attack": 100, "defense": 123, "spAtk": 122, "spDef": 120, "speed": 80, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.594Z", "updated_at": "2022-02-03T17: 46: 46.594Z" }, 
    { "id": 5, "number": 4, "name": "Charmander", "type1": "Fire", "type2": null, "total": 309, "hp": 39, "attack": 52, "defense": 43, "spAtk": 60, "spDef": 50, "speed": 65, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.610Z", "updated_at": "2022-02-03T17: 46: 46.610Z" }, 
    ...], 
    "per_page": 30, 
    "links": { "first": "/?page=1", "next": "/?page=2", "last": "/?page=27" }
}

Show

GET /pokemon/7

{ "id": 7, "number": 6, "name": "Charizard", "type1": "Fire", "type2": "Flying", "total": 534, "hp": 78, "attack": 84, "defense": 78, "spAtk": 109, "spDef": 85, "speed": 100, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.642Z", "updated_at": "2022-02-03T17: 46: 46.642Z" }

Update

PUT /pokemon/7 { "pokemon": { "name": "Morgane" }}

{ "id": 7, "number": 6, "name": "Morgane", "type1": "Fire", "type2": "Flying", "total": 534, "hp": 78, "attack": 84, "defense": 78, "spAtk": 109, "spDef": 85, "speed": 100, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.642Z", "updated_at": "2022-02-03T17: 46: 46.642Z" }

Create

POST /pokemon { "number": 3000, "name": "Kali", "type1": "Normal", "total": 325, "hp": 55, "attack": 55, "defense": 50, "spAtk": 45, "spDef": 65, "speed": 55, "generation": 7, "legendary": true}"

{ "id": 801, "number": 3000, "name": "Kali", "type1": "Normal", "type2": null, "total": 325, "hp": 55, "attack": 55, "defense": 50, "spAtk": 45, "spDef": 65, "speed": 55, "generation": 1, "legendary": true, "created_at": "2022-02-03T17: 46: 48.683Z", "updated_at": "2022-02-03T17: 46: 48.683Z" }"

Delete

DELETE /pokemon/7

{ "id": 7, "number": 6, "name": "Morgane", "type1": "Fire", "type2": "Flying", "total": 534, "hp": 78, "attack": 84, "defense": 78, "spAtk": 109, "spDef": 85, "speed": 100, "generation": 1, "legendary": false, "created_at": "2022-02-03T17: 46: 46.642Z", "updated_at": "2022-02-03T17: 46: 46.642Z" }

pokedex's People

Contributors

grdscrc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.