-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstructions.txt
28 lines (22 loc) · 1.12 KB
/
instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
= I can see the weather in my current location.
= I can see a different icon or background image (e.g. snowy mountain, hot desert) depending on the weather.
= I can push a button to toggle between Fahrenheit and Celsius.
Use the endpoint: https://fcc-weather-api.glitch.me/
this server accepts GET requests only, and serves only the route /api/current?lon=:longitude&lat=:latitude.
Example Request: https://fcc-weather-api.glitch.me/api/current?lat=35&lon=139
Response: {
"coord":{ "lon":159, "lat":35 },
"weather":[ { "id":500, "main":"Rain", "description":"light rain", "icon":"https://cdn.glitch.com/6e8889e5-7a72-48f0-a061-863548450de5%2F10n.png?1499366021399" } ],
"base":"stations",
"main":{ "temp":22.59, "pressure":1027.45, "humidity":100, "temp_min":22.59, "temp_max":22.59, "sea_level":1027.47, "grnd_level":1027.45 },
"wind":{ "speed":8.12, "deg":246.503 },
"rain":{ "3h":0.45 },
"clouds":{ "all":92 },
"dt":1499521932,
"sys":{ "message":0.0034, "sunrise":1499451436, "sunset":1499503246 },
"id":0,
"name":"",
"cod":200
}
Images links are included in the JSON under weather[0].icon.
This is enough to complete the challenge.