Skip to content

dmitryershov0/accuweather-locations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accuweather Locations Api client

https://developer.accuweather.com/accuweather-locations-api/apis

Download

Accuweather Locations Api client is available on NuGet.

Usage

using Accuweather.Locations;


public class Startup
{

    public void ConfigureServices(IServiceCollection services)
    {
        services.AddSingleton<ILocationsApi>(l => new LocationApi("YOUR_API_KEY", "en-us");
    }
}
using Accuweather.Locations;


public class SampleController : Controller
{
    private readonly ILocationsApi _locations;
    
    public void SampleController(ILocationsApi locations)
    {
        _locations = locations;
    }
    
    public async Tasnk<ActionResult> GetRegionList() 
    {
        var regionList = await _locations.GetRegionList();
        return Json(regionList , JsonRequestBehavior.AllowGet);
    }
}

Releases

No releases published

Packages

No packages published

Languages