Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rapter1990/depremapi
Get latest earthquakes list information from Kandilli and AFAD
https://github.com/rapter1990/depremapi
api aws-beanstalk java java-streams jsoup junit lombok spring-boot swagger swagger2
Last synced: about 1 month ago
JSON representation
Get latest earthquakes list information from Kandilli and AFAD
- Host: GitHub
- URL: https://github.com/rapter1990/depremapi
- Owner: Rapter1990
- Created: 2023-02-08T20:10:23.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-17T20:08:37.000Z (about 1 year ago)
- Last Synced: 2024-04-24T06:33:59.981Z (8 months ago)
- Topics: api, aws-beanstalk, java, java-streams, jsoup, junit, lombok, spring-boot, swagger, swagger2
- Language: Java
- Homepage:
- Size: 181 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deprem Api (Kandilli & Afad)
### 📖 Information
- The purpose of the project is to get all data from Kandilli and AFAD and analyze them
- Here is the explanation of the project
- After 7.8-magnitude earthquake and 7.8-magnitude earthquake occured in Turkey on 6th February 2023 and I felt very sad about the devastating disaster, I tried to implement an example of getting all earthquakes data from Kandili and Afad
- Analyze the data to get specific information by filter through Java Stream API
- After 7.8-magnitude earthquake and 7.8-magnitude earthquake occured in Turkey on 6th February 2023 and I felt very sad about the devastating disaster, I tried to implement an example of getting all earthquakes data from Kandili and Afad
### 🔨 Run the App
#### Maven
1 ) Download your project from this link `https://github.com/Rapter1990/DepremApi`
2 ) Go to the project's home directory : `cd DepremApi`
3 ) Create a jar file though this command `mvn clean install`
4 ) Run the project though this command `mvn spring-boot:run`
#### AWS
1 ) Create an Environment in AWS Console with defining app's name and uploading its jar file
2 ) Go to Configuration and Select Software Section and Define SERVER_PORT as its port number 5000
### Explore Rest APIs
Method
Url
Description
Local
AWS
GET
/api/v1/earthquakes/kandili
Get All earthquakes list from Kandilli
Info
Info
GET
/api/v1/earthquakes/afad
Get All earthquakes list from Afad
Info
Info
GET
/api/v1/earthquakes/kandili/locations/{city_name}
Get All earthquakes list from Afad
Info
Info
GET
/api/v1/earthquakes/afad/locations/{city_name}
Filter By Location For Afad
Info
Info
GET
/api/v1/earthquakes/kandili/sizes/{size_value}
Filter By Size ML For Kandilli
Info
Info
GET
/api/v1/earthquakes/afad/sizes/{size_value}
Filter By Location For Afad
Info
Info
GET
/api/v1/earthquakes/kandili/search?location={city_name}&size={size_value}
Filter By Location And Size For Kandilli
Info
Info
GET
/api/v1/earthquakes/afad/search?location={city_name}&size={size_value}
Filter By Location And Size For Afad
Info
Info
GET
/api/v1/earthquakes/kandili/sizes?minml={minml_value}&maxml={maxml_value}
Filter By Size Between Two ML For Kandili
Info
Info
GET
/api/v1/earthquakes/afad/sizes?minml={minml_value}&maxml={maxml_value}
Filter By Size Between Two ML For Afad
Info
Info
### Used Dependencies
* Spring Boot Web
* Java Stream API
* JUnit
* Jsoup
* Log4j2
* Lombok
* Swagger
* AWS Elastic Beanstalk
### Endpoints Information
##### Get All earthquakes list from Kandilli
```
http://localhost:8080/api/v1/earthquakes/kandili
```
##### Get All earthquakes list from Afad
```
http://localhost:8080/api/v1/earthquakes/afad
```
##### Filter By Location For Kandilli
```
http://localhost:8080/api/v1/earthquakes/kandili/locations/{city_name}
http://localhost:8080/api/v1/earthquakes/kandili/locations/malatya
```
##### Filter By Location For Afad
```
http://localhost:8080/api/v1/earthquakes/afad/locations/{city_name}
http://localhost:8080/api/v1/earthquakes/afad/locations/malatya
```
##### Filter By Size ML For Kandilli
```
http://localhost:8080/api/v1/earthquakes/kandili/sizes/{size_value}
http://localhost:8080/api/v1/earthquakes/kandili/sizes/3.2
```
##### Filter By Size ML For Afad
```
http://localhost:8080/api/v1/earthquakes/afad/sizes/{size_value}
http://localhost:8080/api/v1/earthquakes/afad/sizes/3.2
```
##### Filter By Location And Size For Kandilli
```
http://localhost:8080/api/v1/earthquakes/kandili/search?location={city_name}&size={size_value}
http://localhost:8080/api/v1/earthquakes/kandili/search?location=malatya&size=3.2
```
##### Filter By Location And Size For Afad
```
http://localhost:8080/api/v1/earthquakes/afad/search?location={city_name}&size={size_value}
http://localhost:8080/api/v1/earthquakes/afad/search?location=malatya&size=3.2
```
##### Filter By Size Between Two ML For Kandili
```
http://localhost:8080/api/v1/earthquakes/kandili/sizes?minml={minml_value}&maxml={maxml_value}
http://localhost:8080/api/v1/earthquakes/kandili/sizes?minml=1.1&maxml=4.4
```
##### Filter By Size Between Two ML For Afad
```
http://localhost:8080/api/v1/earthquakes/afad/sizes?minml={minml_value}&maxml={maxml_value}
http://localhost:8080/api/v1/earthquakes/afad/sizes?minml=1.1&maxml=4.4
```
### Screenshots
Click here to show the screenshots of project
Figure 1