Skip to content

Latest commit

 

History

History
204 lines (167 loc) · 6.9 KB

README.md

File metadata and controls

204 lines (167 loc) · 6.9 KB

Deprem Api (Kandilli & Afad)

Main Information

📖 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

🔨 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