TcmbApiClient class

A dart client for TCMB(Central Bank of the Republic of Türkiye) rate of exchanges API: https://www.tcmb.gov.tr/kurlar/{date}.xml, examples of date: today, 202404/22042024. TCMB is the acronym used in Turkish for our central bank, that's why it used in TcmbAPiClient class name (for convenience purposes)

Constructors

TcmbApiClient.new({Client? httpClient, Xml2Json? xmlTransformer})
A dart client for TCMB(Central Bank of the Republic of Türkiye) rate of exchanges API: https://www.tcmb.gov.tr/kurlar/{date}.xml, examples of date: today, 202404/22042024. TCMB is the acronym used in Turkish for our central bank, that's why it used in TcmbAPiClient class name (for convenience purposes)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
getPathForDate(DateTime dateTime) String
Internal private method that constructs the part required for endpoint when requesting rates for days other than today
getRates({DateTime? date}) Future<List<Currency>>
Fetches the exchange rates from the TCMB API.
getSingleRate(CurrencyCode currencyCode, {DateTime? date}) Future<Currency?>
Fetches the exchange rate for a single currency from the TCMB API.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
xmlToJson(String xml) String
Internal private method that converts xml string passed as a parameter to json format

Operators

operator ==(Object other) bool
The equality operator.
inherited