A RESTful API that serves States in Nigeria with their LGAs, major landmarks and streets
# GPS-naija API Project
## Project Description
In this project, i created a RESTful API with Flask. It is a backend app with a database integration and routes for communicating with clients. Its main purpose is to provide clients with names of places in Nigeria organized into States, LGAs, Locations (major landmarks) and Streets. These data have already been prestored and constantly updated in the database.
* Deployed Project Link: gps-naija
* Blog Post: gps-naija
* Author: Samuel Nnadozie
## Description of the routes:
There are two main routes that handle client requests from frontend. These are:
# /states:
This route does not require any argument, and it returns a dictionary in which is contained data of all the States in Nigeria.
# /states/state_name:
This route takes state_name as argument and returns a dictionary in which is contained data of the State with the name state_name .
## Description of the response:
Response from the API is a json-formatted dictionary object with three keys: status , data , and error . It must be parsed with an appropriate method before data could be accessed from it.
The value of the status key is a string and coud either be success or error depending on the result of the request.
The error key has a dictionary value. Its main purpose is to provide clear description of any error that might have occured during the processing of the client request. It has two keys:
- errors (list): holds each instance of error that occured during the processing of the request. An instance of an error with error_code and data as keys. Error_code is an integer which represents the type of error that occured, while data is a list containing data being prcessed when the error occured.
- legend (dictionary): holds the decription of different types of error that coud occure during request processing. The error_codes are the keys while the descriptions of the errors are their corresponding values.
When the status of the request is …