now using using
This commit is contained in:
parent
ca8d1893db
commit
cc8136fb53
17
main.odin
17
main.odin
@ -58,16 +58,17 @@ main :: proc() {
|
||||
}
|
||||
|
||||
weather_location := weather.name
|
||||
weather_code := weather.sys.country
|
||||
weather_code := weather.country
|
||||
|
||||
weather_resp := weather.weather[0].main
|
||||
weather_resp_detail := weather.weather[0].description
|
||||
//weather_icon := weather.weather[0].icon
|
||||
temperature := weather.main.temp
|
||||
feels_like_temp := weather.main.feels_like
|
||||
temp_min := weather.main.temp_min
|
||||
temp_max := weather.main.temp_max
|
||||
sunset_time := time.to_string_hms_12(time.unix(weather.sys.sunset, 0), buf1[:])
|
||||
sunrise_time := time.to_string_hms_12(time.unix(weather.sys.sunrise, 0), buf2[:])
|
||||
|
||||
temperature := weather.temp
|
||||
feels_like_temp := weather.feels_like
|
||||
temp_min := weather.temp_min
|
||||
temp_max := weather.temp_max
|
||||
sunset_time := time.to_string_hms_12(time.unix(weather.sunset, 0), buf1[:])
|
||||
sunrise_time := time.to_string_hms_12(time.unix(weather.sunrise, 0), buf2[:])
|
||||
|
||||
fmt.println("Location:", weather_location)
|
||||
fmt.println("Country Code:", weather_code)
|
||||
|
26
weather.odin
26
weather.odin
@ -44,17 +44,17 @@ Visibility :: struct {
|
||||
}
|
||||
|
||||
WeatherResponse :: struct {
|
||||
clouds: Clouds,
|
||||
sys: Sys,
|
||||
name: string,
|
||||
base: string,
|
||||
coord: Coord,
|
||||
timezone: int,
|
||||
weather: []Weather,
|
||||
main: Main,
|
||||
visibility: int,
|
||||
dt: f64,
|
||||
id: int,
|
||||
wind: Wind,
|
||||
cod: int,
|
||||
using clouds: Clouds,
|
||||
using sys: Sys,
|
||||
name: string,
|
||||
base: string,
|
||||
using coord: Coord,
|
||||
timezone: int,
|
||||
weather: []Weather,
|
||||
using main: Main,
|
||||
visibility: int,
|
||||
dt: f64,
|
||||
id: int,
|
||||
using wind: Wind,
|
||||
cod: int,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user