Skip to content

Commit

Permalink
Updated logo and bumping NuGet packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Nov 14, 2021
1 parent 95d9f64 commit 6659792
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions OpenWeatherMap.Cache/OpenWeatherMap.Cache.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<RepositoryUrl>https://github.com/MarkCiliaVincenti/OpenWeatherMap.Cache.git</RepositoryUrl>
<PackageProjectUrl>https://github.com/MarkCiliaVincenti/OpenWeatherMap.Cache</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>1.4.2</Version>
<Version>1.4.3</Version>
<PackageIcon>logo.png</PackageIcon>
<PackageReleaseNotes>Bumping NuGet packages</PackageReleaseNotes>
<PackageReleaseNotes>Updated logo and bumping NuGet packages.</PackageReleaseNotes>
<Description>An asynchronous .NET Standard 2.0 library that allows you to fetch &amp; cache current weather readings from the OpenWeatherMap API, with in-built resiliency that can extend the cache lifetime in case the API is unreachable.</Description>
<Copyright>© 2021 Mark Cilia Vincenti</Copyright>
<PackageTags>OpenWeather,OpenWeatherMap,cache,weather,API,.NET Standard,netstandard</PackageTags>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<AssemblyVersion>1.4.2.0</AssemblyVersion>
<FileVersion>1.4.2.0</FileVersion>
<AssemblyVersion>1.4.3.0</AssemblyVersion>
<FileVersion>1.4.3.0</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
Expand All @@ -30,7 +30,7 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.0" />
<PackageReference Include="UnitsNet" Version="4.102.0" />
<PackageReference Include="UnitsNet" Version="4.103.0" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ With *FetchMode.AlwaysUseLastFetchedValue*, the last fetched API result is retur

## Initialization with Dependency Injection
In your Startup.cs (ConfigureServices):
```c#
```csharp
services.AddOpenWeatherMapCache("[API KEY]", 9_500, FetchMode.AlwaysUseLastMeasuredButExtendCache, 300_000);
```

Then you can inject IOpenWeatherMapCache.

## Initialization without Dependency Injection
Create your own instance:
```c#
```csharp
var openWeatherMapCache = new OpenWeatherMapCache("[API KEY]", 9_500, FetchMode.AlwaysUseLastMeasuredButExtendCache, 300_000);
```

## Usage in asynchronous methods (recommended)
```c#
```csharp
var locationQuery = new OpenWeatherMap.Cache.Models.Location(47.6371, -122.1237);
var readings = await openWeatherMapCache.GetReadingsAsync(locationQuery);
if (readings.IsSuccessful)
Expand All @@ -43,7 +43,7 @@ else
```

or by zip code and country code:
```c#
```csharp
var locationQuery = new OpenWeatherMap.Cache.Models.ZipCode("94040", "us");
var readings = await openWeatherMapCache.GetReadingsAsync(locationQuery);
if (readings.IsSuccessful)
Expand All @@ -58,7 +58,7 @@ else
```

## Usage in synchronous methods
```c#
```csharp
var locationQuery = new OpenWeatherMap.Cache.Models.Location(47.6371, -122.1237);
var readings = openWeatherMapCache.GetReadingsAsync(locationQuery).Result;
if (readings.IsSuccessful)
Expand All @@ -73,7 +73,7 @@ else
```

or by zip code and country code:
```c#
```csharp
var locationQuery = new OpenWeatherMap.Cache.Models.ZipCode("94040", "us");
var readings = openWeatherMapCache.GetReadingsAsync(locationQuery).Result;
if (readings.IsSuccessful)
Expand Down
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6659792

Please sign in to comment.