Logo Lanfrica

silvareal/naijaLGA-API

Domaine:

digital infrastructuregeospatial

Type de record:

software
Créateur:
sil
HĂ´te:
API for getting all states and Local Government Areas in Nigeria-🇳🇬 # naijaLGA-API API for getting all states and Local Government Areas in Nigeria-🇳🇬 # About A simple API that shows the states and Local Government Areas in Nigera, and displays them in json format, nice right 👉, For developer who need a dropdown of States or Local government Areas in Nigeria(Not constrained to that use case only). built with ❤️‍, Django, Django Rest Framework. More details on technology used below👇. # Versioning We hope to improve this API on every release version, and these changes won't always be backward compatible. V1 will be live at {domain}/api/v1/ and is structured as described below👇. # States To get the list of all states in Nigeria, Endpoint. {domain}/api/v1/state/ ```json { { "state": "Abia", "capital": "Umuahia", "lat": 22.92, "population": 2338487, "coord": { "lon": 7.515307, "lat": 5.454095, }, }, { "state": "Adamawa", "capital": "Yola", "population": 2102053, "coord": { "lon": 12.388189, "lat": 9.512977, } }, ... } ``` States are identified using their names, which are unique and case sensitive(state begins with an uppercase `/Abia/`). For example, a state: {domain}/api/v1/states/Abia/ ```json { "state": "Abia", "capital": "Umuahia", "lat": 22.92, "population": 2338487, "coord": { "lon": 7.515307, "lat": 5.454095, }, } ``` # States And Their LGA's To get the list of all states and their LGA's in Nigeria, Endpoint. {domain}/api/v1/stateslga/ ```json { { "state": "Abia", "capital": "Umuahia", "lat": 22.92, "population": 2845380, "coord": { "lon": 7.515307, "lat": 5.454095, }, "lga": [ { "name": "Aba North", "population": 106844, "coord": { "lon": 7.394788, "lat": 5.093863 } }, { "name": "Aba South", "population": 427421, "coord": { "lon": 7.349714, "lat": 5.087659 } }, { "name": "Arochukwu", "population": 169339, "coord": { "lon": 7.916667, "lat": 5.383333 } }, { "name": "Bende", "population": 192621, "coord": { "lon": 9.000001, "lat": 1e-06 } }, ... ] }, { "state": "Adamawa", "capital": "Yola", "population": 3178950, "coord": { …