Skip to content

SWRAguacate/SPSTest

Repository files navigation

SPS Test: Archivo PDF con la documentación del API

URL's del host:
https://spstest-be7416f5a09a.herokuapp.com/api/v1/pokemon
https://spstest-be7416f5a09a.herokuapp.com/api/v1/ability

En base a las anteriores se pueden consultar mas así:
https://spstest-be7416f5a09a.herokuapp.com/api/v1/pokemon/bulbasaur
https://spstest-be7416f5a09a.herokuapp.com/api/v1/ability/stench

Si necesitas consultar la disponibilidad del API puedes hacerlo aquí:
https://spstest-be7416f5a09a.herokuapp.com/api/v1/pokemon/health

Se configuró un API en NodeJS con express para consumir información de un API externa, en local se corre el programa en el puerto 8090

API Endpoints Documentation

BASE API LOCAL: http://localhost:8090/api/v1/pokemon

URL del repositorio GItHUB:

POKEMON

/pokemon/health
GET
Descripción: Verifica la disponibilidad de la API de Pokémon.
Response:
- 200 OK: La API está disponible.

/pokemon
GET
Descripción: Obtiene todos los Pokémon.
Response:
- 200 OK: Retorna todos los Pokémon encontrados.

/pokemon/{id}
GET
Descripción: Obtiene un Pokémon específico por su ID.
Parameters:
- id: ID del Pokémon a obtener (path parameter).
Response:
- 200 OK: Retorna el Pokémon encontrado.

ABILITY

/ability/health
GET
Descripción: Verifica la disponibilidad de la API de Habilidades de Pokémon.
Response:
- 200 OK: La API está disponible.

/ability
GET
Descripción: Obtiene todas las habilidades de Pokémon.
Response:
- 200 OK: Retorna todas las habilidades encontradas.

/ability/{id}
GET
Descripción: Obtiene una habilidad específica por su ID.
Parameters:
- id: ID de la habilidad a obtener (path parameter).
Response:
- 200 OK: Retorna la habilidad encontrada.



Postman:

  {
    
    "info": {  
    
    "_postman_id": "20d49eb8-c887-4c8e-ae5a-570f843009a1",  

    "name": "SPS Test API",  

    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",  

    "_exporter_id": "19637880",  

    "_collection_link": "https://interstellar-meteor-180078.postman.co/workspace/Buisness-directory~a1e119a3-e1f3-4b4a-b4b3-f0d0143bd2c8/collection/19637880-20d49eb8-c887-4c8e-ae5a-570f843009a1?action=share&source=collection_link&creator=19637880"  

},  

"item": [  

    {  

        "name": "Get All Pokemons",  

        "protocolProfileBehavior": {  

            "disableBodyPruning": true  

        },  

        "request": {  

            "method": "GET",  

            "header": [],  

            "body": {  

                "mode": "raw",  

                "raw": "{\r\n  \"nombre\": \"Fix Ferreterias\",\r\n  \"correo\":\"comprasonline@fixferreterias.com\",\r\n  \"celular\": 5580222611,\r\n  \"ubicacion\": \"ubicacion\",\r\n  \"pagina\": \"https://www.fixferreterias.com/\"\r\n}",  

                "options": {  

                    "raw": {  

                        "language": "json"  

                    }  

                }  

            },  

            "url": {  

                "raw": "http://localhost:8090/api/v1/pokemon",  

                "protocol": "http",  

                "host": [  

                    "localhost"  

                ],  

                "port": "8090",  

                "path": [  

                    "api",  

                    "v1",  

                    "pokemon"  

                ]  

            }  

        },  

        "response": []  

    },  

    {  

        "name": "Get Pokemon by name or ID",  

        "request": {  

            "method": "GET",  

            "header": [],  

            "url": {  

                "raw": "http://localhost:8090/api/v1/pokemon/bulbasaur",  

                "protocol": "http",  

                "host": [  

                    "localhost"  

                ],  

                "port": "8090",  

                "path": [  

                    "api",  

                    "v1",  

                    "pokemon",  

                    "bulbasaur"  

                ]  

            }  

        },  

        "response": []  

    },  

    {  

        "name": "Get All Abilities",  

        "request": {  

            "method": "GET",  

            "header": [],  

            "url": {  

                "raw": "http://localhost:8090/api/v1/ability/",  

                "protocol": "http",  

                "host": [  

                    "localhost"  

                ],  

                "port": "8090",  

                "path": [  

                    "api",  

                    "v1",  

                    "ability",  

                    ""  

                ]  

            }  

        },  

        "response": []  

    },  

    {  

        "name": "Get Ability by name or ID",  

        "request": {  

            "method": "GET",  

            "header": [],  

            "url": {  

                "raw": "http://localhost:8090/api/v1/ability/1",  

                "protocol": "http",  

                "host": [  

                    "localhost"  

                ],  

                "port": "8090",  

                "path": [  

                    "api",  

                    "v1",  

                    "ability",  

                    "1"  

                ]  

            }  

        },  

        "response": []  

    },  

    {  

        "name": "Ask Health",  

        "request": {  

            "method": "GET",  

            "header": [],  

            "url": {  

                "raw": "http://localhost:8090/api/v1/ability/health",  

                "protocol": "http",  

                "host": [  

                    "localhost"  

                ],  

                "port": "8090",  

                "path": [  

                    "api",  

                    "v1",  

                    "ability",  

                    "health"  

                ]  

            }  

        },  

        "response": []  

    }  

] 
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published