Live URL API : https://nameless-plains-51062.herokuapp.com/geolocation
Live URL Angular : https://geolocation-web.herokuapp.com/
Follow these steps to get started:
$ git clone https://github.com/Istiaq-Hossain-Shawon/geolocation-api
mvn install
mvn spring-boot:run
Follow these steps to get started:
You need to download the last version of Eclipse IDE for Java EE Developers, for example Lunar version. Make sure that Eclipse has installed the Maven plugin.
$ git clone https://github.com/Istiaq-Hossain-Shawon/geolocation-api
To import an existing Maven project into Eclipse, just right-click the Package Explorer and go to:
Import... > Existing Maven Projects > Select root directory > Finish
It's possible that you need to update Maven project. To do it, just right-click the project and go to:
Maven > Update Project...
This include 2 api endpoints.These are:
- Url:
http://localhost:8095/geolocation/requesttoken
- Body:
{
"username":"user1",
"password":"123456"
}
- Response:
{
"jwt": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyMSIsImV4cCI6MTYxNzgyNjU4MiwiaWF0IjoxNjE3NzkwNTgyfQ.g1Z8_BxbTmq07vpsPU5ppuLSv8Mmqa2IAf445hI2BFQ"
}
- Url:
http://localhost:8095/geolocation/location
- Body:{}
- Add Bearer Token from previous api in Authorization:
- Response:
[
{
"id": 1,
"name": "Mohakhali, Dhaka, Bangladesh",
"latitude": "23.777628",
"longitude": "90.405449"
},
{
"id": 2,
"name": "Barisal District",
"latitude": "22.7022",
"longitude": "90.3696"
},
{
"id": 3,
"name": "Chittagong District",
"latitude": "22.5150",
"longitude": "91.7539"
},
{
"id": 4,
"name": "Comilla District",
"latitude": "23.4576",
"longitude": "91.1809"
},
{
"id": 5,
"name": "Tangail District",
"latitude": "24.3917",
"longitude": "89.9948"
}
]