0% found this document useful (0 votes)
37 views1 page

Codec Input

The document outlines a code snippet that formats and displays weather information using various fields. It includes details such as location, coordinates, weather conditions, humidity, wind speed, temperature, and sunrise/sunset times. The data is sourced from OpenWeatherMap and formatted for presentation with specific styling and icons.

Uploaded by

Phuc Hoang Bao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

Codec Input

The document outlines a code snippet that formats and displays weather information using various fields. It includes details such as location, coordinates, weather conditions, humidity, wind speed, temperature, and sunrise/sunset times. The data is sourced from OpenWeatherMap and formatted for presentation with specific styling and icons.

Uploaded by

Phuc Hoang Bao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

embed

.AddField("🌍 " + Format.Bold(GetText(strs.location)),


$"[{data.Name + ", " +
data.Sys.Country}](https://openweathermap.org/city/{data.Id})",
true)
.AddField("📏 " + Format.Bold(GetText(strs.latlong)),
$"{data.Coord.Lat}, {data.Coord.Lon}", true)
.AddField("☁ " + Format.Bold(GetText(strs.condition)),
string.Join(", ", data.Weather.Select(w => w.Main)),
true)
.AddField("😓 " + Format.Bold(GetText(strs.humidity)),
$"{data.Main.Humidity}%", true)
.AddField("💨 " + Format.Bold(GetText(strs.wind_speed)),
data.Wind.Speed + " m/s", true)
.AddField("🌡 " + Format.Bold(GetText(strs.temperature)),
$"{data.Main.Temp:F1}°C /
{f(data.Main.Temp):F1}°F",
true)
.AddField("🔆 " + Format.Bold(GetText(strs.min_max)),
$"{data.Main.TempMin:F1}°C -
{data.Main.TempMax:F1}°C\n{f(data.Main.TempMin):F1}°F -
{f(data.Main.TempMax):F1}°F",
true)
.AddField("🌄 " + Format.Bold(GetText(strs.sunrise)),
$"{sunrise:HH:mm} {timezone}", true)
.AddField("🌇 " + Format.Bold(GetText(strs.sunset)),
$"{sunset:HH:mm} {timezone}", true)
.WithOkColor()
.WithFooter("Powered by openweathermap.org",

$"http://openweathermap.org/img/w/{data.Weather[0].Icon}.png");

You might also like