Class FirstRateDataIntegrationClient
java.lang.Object
com.bluebell.greenhouse.sol.client.AbstractClient
com.bluebell.greenhouse.sol.client.firstratedata.FirstRateDataIntegrationClient
- All Implemented Interfaces:
GetClient, IntegrationClient, PostClient
@Component("firstRateDataIntegrationClient")
public class FirstRateDataIntegrationClient
extends AbstractClient
implements IntegrationClient, GetClient
Client that fetches data from the firstratedata servers.
- Version:
- 1.0.9
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondownloadDataFiles(String url, @NonNull org.springframework.util.MultiValueMap<String, String> queryParams, String fileName) Downloads the data files from the given endpoint.Returns a JSON string for the given url and query params using the supplied timeout.post(String url, org.springframework.http.HttpHeaders headers, org.springframework.util.MultiValueMap<String, String> queryParams, String body, int timeoutMs) POST is not supported by this client.Methods inherited from class AbstractClient
doGet, doGet, doGet, doGet, doGetResponse, doPost, doPost, downloadFileMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GetClient
doGet, doGet, downloadFileMethods inherited from interface IntegrationClient
get, post
-
Constructor Details
-
FirstRateDataIntegrationClient
public FirstRateDataIntegrationClient()
-
-
Method Details
-
downloadDataFiles
public File downloadDataFiles(String url, @NonNull @NonNull org.springframework.util.MultiValueMap<String, String> queryParams, String fileName) Downloads the data files from the given endpoint.- Parameters:
url- download urlqueryParams- query paramsfileName- target file name- Returns:
- downloaded file
-
get
public String get(String url, org.springframework.util.MultiValueMap<String, String> queryParams, int timeoutMs) Returns a JSON string for the given url and query params using the supplied timeout.- Specified by:
getin interfaceIntegrationClient- Parameters:
url- endpoint urlsqueryParams- query parameterstimeoutMs- request timeout in milliseconds- Returns:
String
-
post
public String post(String url, org.springframework.http.HttpHeaders headers, org.springframework.util.MultiValueMap<String, String> queryParams, String body, int timeoutMs) POST is not supported by this client.- Specified by:
postin interfaceIntegrationClient- Parameters:
url- endpoint urlheaders- request headersqueryParams- query paramsbody- request bodytimeoutMs- request timeout in milliseconds- Returns:
- response body
-