# WeatherInfo API Documentation
=============================
## Overview
The WeatherInfo API is designed to provide real-time weather data for various locations around the world. This API is ideal for developers who want to integrate weather data into their applications. The API supports multiple data formats, including JSON and XML, and offers forecasts for the next seven days. Additionally, it provides weather alerts to keep users informed about any severe weather conditions.
### Key Features
* Supports multiple data formats (JSON, XML)
* Offers forecasts for the next seven days
* Provides weather alerts
### Target Audience
* Developers looking to integrate weather data into their applications
## Endpoints
### 1. `/current`
#### HTTP Method: `GET`
#### Request Parameters:
* `location` (required, string): The name of the city or geographic coordinates (latitude, longitude).
* `units` (optional, string): Unit system used for temperature (metric or imperial).
#### Response Format: `JSON`
#### Example Request:
```
GET /current?location=London&units=metric
```
#### Example Response:
```json
{
"temperature": 15,
"condition": "Partly Cloudy"
}
```
### 2. `/forecast`
#### HTTP Method: `GET`
#### Request Parameters:
* `location` (required, string): The name of the city or geographic coordinates (latitude, longitude).
* `days` (optional, integer): Number of days for the forecast (default is 7).
#### Response Format: `JSON`
#### Example Request:
```
GET /forecast?location=NewYork&days=5
```
#### Example Response:
```json
{
"forecast": [
{
"day": "Monday",
"temperature": 22,
"condition": "Sunny"
},
{
"day": "Tuesday",
"temperature": 20,
"condition": "Cloudy"
}
]
}
```
## Error Codes
* **400: Bad Request**: The server could not understand the request due to invalid syntax.
* **404: Not Found**: The requested resource could not be found.
* **500: Internal Server Error**: The server encountered an unexpected condition.
By following this documentation, you should be able to easily integrate the WeatherInfo API into your application and start retrieving real-time weather data.