Package yahoofinance.quotes.query1v7
Class QuotesRequest<T>
- java.lang.Object
-
- yahoofinance.quotes.query1v7.QuotesRequest<T>
-
- Type Parameters:
T- Type of object that can contain the retrieved information from a quotes request
- Direct Known Subclasses:
FxQuotesQuery1V7Request,StockQuotesQuery1V7Request
public abstract class QuotesRequest<T> extends java.lang.Object- Author:
- Stijn Strickx
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringsymbols
-
Constructor Summary
Constructors Constructor Description QuotesRequest(java.lang.String symbols)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.List<T>getResult()Sends the request to Yahoo Finance and parses the resultTgetSingleResult()java.lang.StringgetSymbols()protected abstract TparseJson(com.fasterxml.jackson.databind.JsonNode node)
-
-
-
Method Detail
-
getSymbols
public java.lang.String getSymbols()
-
parseJson
protected abstract T parseJson(com.fasterxml.jackson.databind.JsonNode node)
-
getSingleResult
public T getSingleResult() throws java.io.IOException
- Throws:
java.io.IOException
-
getResult
public java.util.List<T> getResult() throws java.io.IOException
Sends the request to Yahoo Finance and parses the result- Returns:
- List of parsed objects resulting from the Yahoo Finance request
- Throws:
java.io.IOException- when there's a connection problem or the request is incorrect
-
-