Skip to content

ruben-rdez/openweathermap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenWeatherMap API Spring Boot Application

This is a Spring Boot application that provides a RESTful API to fetch weather information using the OpenWeatherMap API.

Features

  • Fetch current weather data by city name
  • RESTful API endpoints
  • Spring Boot 3.5.3 implementation
  • Easy configuration through application properties

Prerequisites

  • Java 17 or higher
  • Maven 3.6 or higher
  • OpenWeatherMap API key

Configuration

  1. Clone the repository
  2. Update src/main/resources/application.properties with your OpenWeatherMap API key:
    openweathermap.api.key=YOUR_API_KEY

Building the Application

To build the application, run:

mvn clean install

Running the Application

To start the application, run:

mvn spring-boot:run

The application will start on the default port 8080.

API Endpoints

Get Weather by City

GET /weather/{city}

Example:

GET /weather/London

Response:

{
    "weather information will be returned here"
}

Project Structure

src/
├── main/
│   ├── java/
│   │   └── com/
│   │       └── openweathermap/
│   │           ├── controller/
│   │           │   └── WeatherController.java
│   │           ├── model/
│   │           │   └── WeatherResponse.java
│   │           ├── service/
│   │           │   └── WeatherService.java
│   │           └── OpenweathermapApplication.java
│   └── resources/
│       └── application.properties
└── test/
    └── java/
        └── com/
            └── openweathermap/
                └── OpenweathermapApplicationTests.java

Technologies Used

  • Spring Boot 3.5.3
  • Spring Web
  • Maven
  • OpenWeatherMap API

License

This project is available under the [insert license] license.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

An API to check the weather around the world

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages