This SDK make communication with FIO API much easier. At the present time you can get your bank statement in various data format.
You can install SDK for FIO using the NuGet
PM> Install-Package FioSdk
Version 3.0.0. contains important breaking changes. Due to using System.Text.Json library target framework has been changed to NET Standard 2.0.
- all methods support async calls only
- cancellation tokens support
- changed target framework to .NET Standard 2.0
- implemented System.Text.Json instead of Newtonsoft.Json
- possibility to pass own HttpClient to ApiExplorer
- common code cleanup
- all methods support async calls
- added support for .NET Standard 1.3
You can find examples how to use this SDK in the project samples/FioSampleConsoleApp
Notice, that you can call up API every 30 seconds.
At the beginning you must obtain your access token. You can obtain it in your FIO internetbanking. Your token must have read access (writing is not required at this moment).
Once you have your token, you can use SDK and get information about your statement
// create your API explorer
HttpClient optionalHc = new HttpClient();
ApiExplorer explorer = new ApiExplorer("YOUR_TOKEN_MUST_BE_PRESENT_HERE", optionalHc);
// get account statement
AccountStatement statement = explorer.Periods(TransactionFilter.LastMonth());
// browse transactions
foreach (var transaction in statement.TransactionList.Transactions)
{
Console.WriteLine(transaction + " - " + transaction.Amount.Value);
}
var statement = explorer.Periods(TransactionFilter.LastDay());
var statement = explorer.Periods(TransactionFilter.LastMonth());
var statement = explorer.Periods(TransactionFilter.LastDays(14));
var statement = explorer.Periods(TransactionFilter.LastWeeks(8));
string html = explorer.Periods(TransactionFilter.LastDays(10), Format.Html);
string xml = explorer.Periods(TransactionFilter.LastDays(10), Format.Xml);
string csv = explorer.Periods(TransactionFilter.LastDays(10), Format.Csv);
var statement = explorer.Last();
You can change last download date also:
explorer.SetLastDownloadDate(DateTime.UtcNow.AddMonths(-1));
- .NET Standard 2.0 +