This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched all the weather references to use OpenWeatherMap.org
- Loading branch information
Showing
9 changed files
with
288 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
namespace Loupedeck.WeatherPlugin.Models | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
public sealed class WeatherResponse | ||
{ | ||
public Coord coord { get; set; } | ||
public Weather[] weather { get; set; } | ||
public string _base { get; set; } | ||
public Main main { get; set; } | ||
public int visibility { get; set; } | ||
public Wind wind { get; set; } | ||
public Clouds clouds { get; set; } | ||
public int dt { get; set; } | ||
public Sys sys { get; set; } | ||
public int timezone { get; set; } | ||
public int id { get; set; } | ||
public string name { get; set; } | ||
public int cod { get; set; } | ||
} | ||
|
||
public sealed class Coord | ||
{ | ||
public float lon { get; set; } | ||
public float lat { get; set; } | ||
} | ||
|
||
public sealed class Main | ||
{ | ||
public float temp { get; set; } | ||
public float feels_like { get; set; } | ||
public float temp_min { get; set; } | ||
public float temp_max { get; set; } | ||
public int pressure { get; set; } | ||
public int humidity { get; set; } | ||
public float celsius => (float)(this.temp - 273.15); | ||
public float fahrenheit => (float)((this.temp - 273.15) * 9 / 5 + 32); | ||
} | ||
|
||
public sealed class Wind | ||
{ | ||
public float speed { get; set; } | ||
public int deg { get; set; } | ||
public float gust { get; set; } | ||
} | ||
|
||
public sealed class Clouds | ||
{ | ||
public int all { get; set; } | ||
} | ||
|
||
public sealed class Sys | ||
{ | ||
public int type { get; set; } | ||
public int id { get; set; } | ||
public string country { get; set; } | ||
public int sunrise { get; set; } | ||
public int sunset { get; set; } | ||
} | ||
|
||
public sealed class Weather | ||
{ | ||
public int id { get; set; } | ||
public string main { get; set; } | ||
public string description { get; set; } | ||
public string icon { get; set; } | ||
|
||
public byte[] iconBytes { get; set; } | ||
} | ||
|
||
} |
Oops, something went wrong.