Geoapify.SDK
1.5.0
dotnet add package Geoapify.SDK --version 1.5.0
NuGet\Install-Package Geoapify.SDK -Version 1.5.0
<PackageReference Include="Geoapify.SDK" Version="1.5.0" />
<PackageVersion Include="Geoapify.SDK" Version="1.5.0" />
<PackageReference Include="Geoapify.SDK" />
paket add Geoapify.SDK --version 1.5.0
#r "nuget: Geoapify.SDK, 1.5.0"
#:package Geoapify.SDK@1.5.0
#addin nuget:?package=Geoapify.SDK&version=1.5.0
#tool nuget:?package=Geoapify.SDK&version=1.5.0
Geoapify.SDK
A FOSS SDK for Geoapify's API written in .Net.
Usage
I strongly suggest using Dependency Injection via the package Geoapify.DependencyInjection like this:
var apiKey = "YOUR_KEY"; // Probably read this from a secret somewhere
services.AddGeoapify(apiKey);
And you'll have access to the IGeoapifyClient in your Dependency Injection system.
Furthermore if you want updates to addresses as they change (addresses do change over time, albeit not often), you should add both Geoapify.Storage and a form of database (e.g. Geoapify.Storage.MongoDB or provide one yourself, see the notes for the Storage package).
This allows you to store a copy of any relevant addresses locally (in your database), and have a service continuously check for changes to that address and inform you of those.
A full example of that configuration:
var apiKey = "YOUR_KEY"; // Probably read this from a secret somewhere
var client = new MongoClient(mongoConnectionstring);
var db = client.GetDatabase("your-database");
services.AddGeoapify(apiKey) // Injects the IGeoapifyClient
.AddMongoDBStorage(db, "address-collection-name") // Injects an IAddressRepository for MongoDB
.AddStorageUpdaterService() // Injects the StorageUpdaterService that'll check for updates to addresses
.AddAddressChangedHandler<MyHandler>(); // Inject a handler to be invoked whenever an address is updated by the StorageUpdaterService
Documentation
Auto generated documentation via DocFx is available here: https://steffenskov.github.io/Geoapify.SDK/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.8)
- Microsoft.Extensions.DependencyInjection (>= 10.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Http (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Geoapify.SDK:
| Package | Downloads |
|---|---|
|
Geoapify.DependencyInjection
Adds Dependency Injection support for the Geoapify.SDK. |
|
|
Geoapify.Storage
Adds abstract support for local storage of results from the Geoapify.SDK. |
|
|
Geoapify.Storage.MongoDB
Adds MongoDB support for local storage of results from the Geoapify.SDK. |
GitHub repositories
This package is not used by any popular GitHub repositories.