Yanga.Module.Location.Wrapper 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Yanga.Module.Location.Wrapper --version 1.0.0
                    
NuGet\Install-Package Yanga.Module.Location.Wrapper -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Yanga.Module.Location.Wrapper" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Yanga.Module.Location.Wrapper" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Yanga.Module.Location.Wrapper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Yanga.Module.Location.Wrapper --version 1.0.0
                    
#r "nuget: Yanga.Module.Location.Wrapper, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Yanga.Module.Location.Wrapper&version=1.0.0
                    
Install Yanga.Module.Location.Wrapper as a Cake Addin
#tool nuget:?package=Yanga.Module.Location.Wrapper&version=1.0.0
                    
Install Yanga.Module.Location.Wrapper as a Cake Tool

Yanga Location Wrapper

Prerequisites

  • .NET 9

Getting Started

  1. Clone the repository:
  2. Open the solution in Visual Studio:
  3. Update the appsettings.json file with your API key:
  4. Build and run the project:

Dependency injection

builder.Services.AddLocationService(builder.Configuration);

Injection

    private readonly ILocationApiWrapper _locationApiWrapper;

    public LocationController(ILogger<LocationController> logger, ILocationApiWrapper locationApiWrapper, IOptions<LocationSettings> locationSettings)
    {
        _logger = logger;
        _locationSettings = locationSettings.Value ?? throw new ArgumentNullException(nameof(locationSettings));
        _locationApiWrapper = locationApiWrapper;
    }csharp```csharp

Methods

  • Cities: _locationApiWrapper.GetCitiesAsync

  • Query Parameters:

    • pageNumber (int): The page number (1-based).
    • pageSize (int): The number of items per page.
    • fields (string): Comma-separated fields to include, or "all".
    • sortField (string, optional): Field to sort by.
    • sortOrder (int, optional): Sort order: 1 (ascending), -1 (descending), null (default).
    • countryCode (string, optional): Country code filter.
    • minPopulation (long): Minimum population filter.

Exemple

var result = await _locationApiWrapper.GetCitiesAsync(

new YangaModuleLocationGetCitiesPaginatedRequest
{
ApiKey = apiKey,
Language = "de",
PageNumber = 1,
PageSize = 10,
SortField = null,
SortOrder = null,
CountryCode = "de",
MinPopulation = 0,
});
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.0 95 4/5/2025
1.4.0 144 3/31/2025
1.3.5 138 3/31/2025
1.3.4 136 3/31/2025
1.3.3 139 3/31/2025
1.3.2 116 3/27/2025
1.3.1 68 3/22/2025
1.3.0 56 3/21/2025
1.2.0 112 3/21/2025
1.0.0 144 3/19/2025