This repository was archived by the owner on Nov 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
StaticData ASPNET ussage
Xelit3 edited this page Oct 10, 2019
·
4 revisions
-
Using NuGet package manager:
Search ChustaSoft.Services.StaticData.AspNet on NuGet public gallery -
By Package Manager console
Install-Package ChustaSoft.StaticData.AspNet -Version 2.0.0 -
By .NET CLI
dotnet add package ChustaSoft.StaticData.AspNet --version 2.0.0
Once the tool is installed on an ASPNET Core project, StaticData provides automatically a Controller inside the application, here you have all the availaible enpoints:
- Root path: api/staticdata
- cities/{country}
- cities [Countries array on body]
- countries
- countries/{countryName}
- countries/{alphaType}/{alphaCode} *
- currencies
- currencies/{currencySymbol}
- exchangerates/{currencyFrom}/{currencyTo}/{date} **
- exchangerates/latest/{currency}
- exchangerates/historical/{currency}/{beginDate}/{endDate} **
- exchangerates/bidirectional/{currencyFrom}/{currencyTo}/{date}
- exchangerates/configured/latest
- exchangerates/configured/historical/{beginDate}/{endDate} **
*: Alpha types: Alpha3, Alpha2
**: All date dormats: dd-MM-yyyy
Additionally, in case of need those services outside a controller, the only thing needed for using it is to inject one of the following services inside your custom implementation. All services are internally documented: