An open API service indexing awesome lists of open source software.

https://github.com/leoguilen/serveless_functions_ibge

Functions que retornam informações sobre localizações disponibilizadas pela API do IBGE, que serão reutilizadas em outros projetos
https://github.com/leoguilen/serveless_functions_ibge

functions serveles

Last synced: 3 months ago
JSON representation

Functions que retornam informações sobre localizações disponibilizadas pela API do IBGE, que serão reutilizadas em outros projetos

Awesome Lists containing this project

README

        


IBGE Serveless Functions



This project is published in


URL Base: https://ibgefunctions.netlify.app/.netlify




  • /functions/estados

  • /functions/cidades?uf=SP


  • [![Netlify Status](https://api.netlify.com/api/v1/badges/539be309-cc88-467f-8344-d740c5faae6f/deploy-status)](https://app.netlify.com/sites/ibgefunctions/deploys)

    GitHub top language


    GitHub last commit

    ## :information_source: How To Use

    To clone and run this application, you'll need [Git](https://git-scm.com), [Node.js v10.16][nodejs] or higher + [Yarn v1.13][yarn] or higher installed on your computer. From your command line:

    - ### **Dev Mode**

    ```bash
    # Clone this repository
    $ git clone https://github.com/leoguilen/serveless_functions_ibge.git

    # Install dependencies
    $ npm install

    # Run the app
    $ npm start
    ```

    You can test in browser using url http://localhost:9000. Routes to functions:

    ##### **/functions/estados** - *Return all states of brazil*

    ```json
    // http://localhost:9000/estados

    [
    {...},
    {
    "id": 35,
    "sigla": "SP",
    "nome": "São Paulo",
    "regiao": {
    "id": 3,
    "sigla": "SE",
    "nome": "Sudeste"
    }
    }
    ]
    ```

    **/functions/cidades?uf={uf do estado}** ***- Return all cities in specific state***

    ```json
    // http://localhost:9000/cidades?uf=SP

    [
    {...},
    {
    "nome": "Adamantina"
    },
    ]
    ```

    ---

    Made with ♥ by Leonardo Guilen :wave: [Get in touch!](https://www.linkedin.com/in/leonardo-guilen/)

    [nodejs]: https://nodejs.org/
    [npm]: https://www.npmjs.com/
    [vc]: https://code.visualstudio.com/