brazilian_cities_api

command module
v0.0.0-...-b4bd889 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 5 Imported by: 0

README

Brazilian Cities API

This API contains most of the brazilian cities and can be used as search database.

It contains the cities endpoint that will return all cities in the system and accept a q parameter to do a text search based on the city name.

API

GET /cities/

Return all cities

[{
    "id": "fdba782e-f421-4837-93f8-9f73fbd70da4",
    "name": "São José da Safira"
    "verbose": "São José da Safira, MG"
    "state: {
        "id": "d233ffc9-b681-4996-b65b-fa9f9393aa15",
        "name": "MG",
        "verbose": "Minas Gerais",
    },
}]

GET /cities/?q=São José

Return all cities that contains sao jose, the api will normalize the search parameters and validate it against a normalized city name.

[{
    "id": "fdba782e-f421-4837-93f8-9f73fbd70da4",
    "name": "São José da Safira"
    "verbose": "São José da Safira, MG"
    "state: {
        "id": "d233ffc9-b681-4996-b65b-fa9f9393aa15",
        "name": "MG",
        "verbose": "Minas Gerais",
    },
}]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL