/apibus

Primary LanguageJava

Apibus

Api that expose some endpoints to manipulate bus lines data stored in a MongoDb database, the api has basic endpoints to CRUD operations and have one more endpoint to search by lines given a central point(latitude,longitude) and a range, then will retrieve all lines that cover the range. Have one more function to search by address too, missing only an external api to retrieve the coordinates.

For store the data was used MongoDb, because is the database i'm have more knowlege and because GeoQueries function too.

Frameworks and apis used:
SpringBoot
Spring Web to develop rest api.
Spring Data MongoDb to interact with database with simple named methods
For the Api Request was used RestTemplate, is simple to make requests with it.

Example request to find all lines

image

Example query to find a line by code

image

Example request to search lines within a radius image