RequestProxy

public abstract class RequestProxy<T extends TimeSeries.RequestProxy<? extends Object, U>, U>

An abstract proxy for building requests. Adds the functionality of adding callbacks and a terminal method for fetching data.

Parameters

<T>

a concrete RequestProxy implementation

<U>

the response type returned during a synchronous call

Inheritors

Functions

Link copied to clipboard
public T dataType(DataType type)
Sets the format the API returns the series in.
Link copied to clipboard
public void fetch()
Sets the right builder and makes an async http request using fetch.
Link copied to clipboard
public U fetchSync()
Sets the right builder and makes a synchronous request using fetch.
Link copied to clipboard
public T forSymbol(String symbol)
Sets the ticker symbol the request reports on.
Link copied to clipboard
Sets the callback invoked with the cause when an async call fails.
Link copied to clipboard
public T onSuccess(Fetcher.SuccessCallback<? extends Object> callback)
Sets the callback invoked with the parsed response when an async call succeeds.
Link copied to clipboard
public void setSyncResponse(U response)
Sets the response received during a synchronous call.