Git Product home page Git Product logo

pokedex-api-sendu's Introduction

PokeAPI Sendu

As part of the selection process for the position of software engineer of the SENDU company, it is requested to generate an API, which provides a CRUD, based on the pokedexAPI.

Getting Started

Requirements

Setup

  • Run the setup script to get everything working

    make setup

Development

How to run the app

  • Run the server using the following command:

    make serve

Troubleshooting

  • Access to rails console:

    make console
  • Acess bash interactive shell:

    make shell
  • To clear all the containers and volumes with database data.

    make destroy

How use the API

The application provides RESTful API endpoints at the following URL: `http://localhost:3000/api/v1/pokemons`. The API supports the following HTTP methods:
  • POST: Create a new Pokemon
  • PUT: Update an existing Pokemon
  • DELETE: Delete a Pokemon
  • GET (Index): Retrieve a list of all Pokemons
  • GET (Show): Retrieve details of a specific Pokemon

Insomnia Integration

To interact with the API seamlessly, you can use Insomnia, a powerful API testing and design tool.

Importing the API into Insomnia
  1. Open Insomnia and create a new workspace or open an existing one.
  2. Click on the '+' icon to create a new request.
  3. From the top menu, choose "Import"
  4. In the popup window, select "From File."
  5. Locate and choose the Insomnia_2023-11-09.json file in your repository.
  6. Click "Import" to load the project configuration into Insomnia.

Swagger Integration

It can also be tested through swagger...

Documentation

For API documentation, Swagger is the tool of choice. To generate the HTML using Swagger, run the following command:

rake rswag:specs:swaggerize

Once generated, you can access the documentation through the following link:

Swagger Documentation

How to run tests

You can choose any of the methods mentioned above to run commands to execute the specs

  1. To run all the tests

    make test
  2. To run a specific test file

    make shell
    rspec <spec_path>
  3. To run a specific test within a file

    make shell
    rspec <spec_path>:<line>

pokedex-api-sendu's People

Contributors

claudiocampuzano 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.