Class MetisHTTPYQLClient
java.lang.Object
io.github.tonywasher.joceanus.metis.http.MetisHTTPDataClient
io.github.tonywasher.joceanus.metis.http.MetisHTTPYQLClient
Client to query YQL.
- Author:
- Tony Washer
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.tonywasher.joceanus.metis.http.MetisHTTPDataClient
MetisHTTPDataClient.MetisHTTPAuthType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionobtainExchangeRate(Currency pFrom, Currency pTo) Obtain exchange rate for currency pair.obtainExchangeRates(Currency pFrom, List<Currency> pToList) Obtain exchange rate for currency pairs.obtainSecurityPrice(String pSymbol, Currency pCurrency) Obtain price for individual security.obtainSecurityPrices(List<String> pSymbols, Currency pCurrency) Obtain price for individual security.Methods inherited from class io.github.tonywasher.joceanus.metis.http.MetisHTTPDataClient
getAbsoluteJSONArray, getAbsoluteJSONObject, getJSONArray, getJSONObject, postRequest, queryJSONArray, queryJSONArrayWithHeader, queryJSONArrayWithHeaderAndTrailer, queryJSONArrayWithTrailer, queryJSONObject, queryJSONObjectWithHeader, queryJSONObjectWithHeaderAndTrailer, queryJSONObjectWithTrailer
-
Constructor Details
-
MetisHTTPYQLClient
Constructor.- Parameters:
pFormatter- the data formatter
-
-
Method Details
-
obtainSecurityPrice
Obtain price for individual security.- Parameters:
pSymbol- the security symbolpCurrency- the currency for the price- Returns:
- the price
- Throws:
OceanusException- on error
-
obtainSecurityPrices
public Map<String,OceanusPrice> obtainSecurityPrices(List<String> pSymbols, Currency pCurrency) throws OceanusException Obtain price for individual security.- Parameters:
pSymbols- the security symbolspCurrency- the currency for the price- Returns:
- the price
- Throws:
OceanusException- on error
-
obtainExchangeRate
Obtain exchange rate for currency pair.- Parameters:
pFrom- the from currencypTo- the to currency- Returns:
- the price
- Throws:
OceanusException- on error
-
obtainExchangeRates
public Map<Currency,OceanusRatio> obtainExchangeRates(Currency pFrom, List<Currency> pToList) throws OceanusException Obtain exchange rate for currency pairs.- Parameters:
pFrom- the from currencypToList- the list of to currencies- Returns:
- the price
- Throws:
OceanusException- on error
-