File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77> A REST API to check the current weather.
88
9- > http://goweather.xyz/weather/Berlin <br />
10- http://goweather.xyz/weather/{city}
9+ > http://goweather.xyz/weather/Berlin <br /> > http://goweather.xyz/weather/{city}
1110
1211## Build locally (Mac users)
12+
1313``` sh
1414go build
1515```
16+
1617## Run
18+
1719``` sh
1820./weather-api
1921```
22+
2023## Usage
24+
2125``` sh
2226curl http://localhost:3000/weather/{city}
2327```
28+
2429## Example
30+
2531#### Request
32+
2633``` sh
2734curl http://localhost:3000/weather/Curitiba
2835```
36+
2937#### Response
38+
3039``` json
3140{
32- "temperature" :" 29 °C" ,
33- "wind" :" 20 km/h" ,
34- "description" :" Partly cloudy" ,
35- "forecast" :[
36- {
37- "day" :1 ,
38- "temperature" :" 27 °C" ,
39- "wind" :" 12 km/h"
40- },
41- {
42- "day" :2 ,
43- "temperature" :" 22 °C" ,
44- "wind" :" 8 km/h"
45- }
46- ]
41+ "temperature" : " 29 °C" ,
42+ "wind" : " 20 km/h" ,
43+ "description" : " Partly cloudy" ,
44+ "forecast" : [
45+ {
46+ "day" : 1 ,
47+ "temperature" : " 27 °C" ,
48+ "wind" : " 12 km/h"
49+ },
50+ {
51+ "day" : 2 ,
52+ "temperature" : " 22 °C" ,
53+ "wind" : " 8 km/h"
54+ }
55+ ]
4756}
4857```
58+
4959## Web Version
5060
5161Few web clients of the API and their Projects:
@@ -56,5 +66,9 @@ Few web clients of the API and their Projects:
56662 . ** Client:** [ https://emaniaditya.github.io/weather-app ] ( https://emaniaditya.github.io/weather-app )
5767 ** Project:** [ https://github.com/emaniaditya/weather-app/ ] ( https://github.com/emaniaditya/weather-app/ )
5868
69+ 3 . ** Client:** [ https://weather-react-tsx.netlify.app/ ] ( https://weather-react-tsx.netlify.app/ )
70+ ** Project:** [ https://github.com/keissiant/weather-api-react.tsx ] ( https://github.com/keissiant/weather-api-react.tsx )
71+
5972## License
73+
6074The MIT License ([ MIT] ( https://github.com/robertoduessmann/weather-api/blob/master/LICENSE ) )
You can’t perform that action at this time.
0 commit comments