https://github.com/redraw/fake-weather-challenge
https://github.com/redraw/fake-weather-challenge
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/redraw/fake-weather-challenge
- Owner: redraw
- Created: 2020-03-17T02:33:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-25T23:35:10.000Z (about 6 years ago)
- Last Synced: 2025-05-28T04:52:43.112Z (about 1 year ago)
- Language: Python
- Size: 34.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fake-weather-challenge
## Install
Clone the repo,
```bash
$ git clone --recurse-submodules git@github.com:redraw/fake-weather-challenge.git
```
or
```bash
$ git clone git@github.com:redraw/fake-weather-challenge.git
$ git submodule update --init
```
That way we can also fetch the `mock-weather-api` submodule.
## Run
```bash
$ docker-compose up
```
Go to `http://localhost:8000`
## API
### `GET /api/temp`
- lat: latitude
- lon: longitude
- providers: separated by comma. Possible values: noaa, accuweather, weatherdotcom
- unit: default is celsius. Possible values: celsius, fahrenheit
```
GET /api/temp/?lat=33.3&lon=22.5&providers=noaa,accuweather
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"avg": {
"celsius": 12.0
},
"query": {
"lat": 33.3,
"lon": 22.5,
"unit": "celsius",
"providers": [
"accuweather",
"noaa"
]
}
}
```