com.factset.sdk.FactSetBenchmarks.api.HelperApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of factsetbenchmarks Show documentation
Show all versions of factsetbenchmarks Show documentation
FactSet SDK for Java - factsetbenchmarks
package com.factset.sdk.FactSetBenchmarks.api;
import com.factset.sdk.FactSetBenchmarks.ApiException;
import com.factset.sdk.FactSetBenchmarks.ApiClient;
import com.factset.sdk.FactSetBenchmarks.ApiResponse;
import com.factset.sdk.FactSetBenchmarks.Configuration;
import com.factset.sdk.FactSetBenchmarks.Pair;
import javax.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import com.factset.sdk.FactSetBenchmarks.models.BenchmarkIdListRequest;
import com.factset.sdk.FactSetBenchmarks.models.BenchmarkIdListResponse;
import com.factset.sdk.FactSetBenchmarks.models.ErrorResponse;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HelperApi {
private ApiClient apiClient;
public HelperApi() {
this(Configuration.getDefaultApiClient());
}
public HelperApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
private static final Map getBenchmarkIdsResponseTypeMap = new HashMap();
static {
getBenchmarkIdsResponseTypeMap.put(200, new GenericType(){});
getBenchmarkIdsResponseTypeMap.put(400, new GenericType(){});
getBenchmarkIdsResponseTypeMap.put(401, new GenericType(){});
getBenchmarkIdsResponseTypeMap.put(403, new GenericType(){});
getBenchmarkIdsResponseTypeMap.put(415, new GenericType(){});
getBenchmarkIdsResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getBenchmarkIdsForListResponseTypeMap = new HashMap();
static {
getBenchmarkIdsForListResponseTypeMap.put(200, new GenericType(){});
getBenchmarkIdsForListResponseTypeMap.put(400, new GenericType(){});
getBenchmarkIdsForListResponseTypeMap.put(401, new GenericType(){});
getBenchmarkIdsForListResponseTypeMap.put(403, new GenericType(){});
getBenchmarkIdsForListResponseTypeMap.put(415, new GenericType(){});
getBenchmarkIdsForListResponseTypeMap.put(500, new GenericType(){});
}
/**
* Get the API client
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Returns a sample list of Benchmark Identifiers and the benchmark categorization to use in other Benchmark API endpoints.
* Returns a **sample** list of Benchmark Identifiers to use in other Benchmark API endpoints. This is a supporting API to be use alongside the other Benchmark API endpoints. For example, use the fsymID value returned in this response as the input to your `ids` parameter in the /constituents endpoint to return constituents for that id.<p> *This is not the full list of benchmark ids allowed in this service, but rather a representation of the most commonly requested. For complete assistance with ID lookup or concordance services, please reach out to FactSet Support. *</p>
* @param familyFilter Highest Level Filter to search by common Benchmark Families, such as S&P, MSCI, or Russell. This will retrieve all related benchmark ids. For further filtering, use the response items such as the categoryDescription field. Leave blank if you wish to see a full sample list of ids. requested- * **CHINA & HK INDICES** - Major Hong Kong and China Indices, such as Hang Seng Index (HSI-HKX) * **DOW JONES** - Dow Jones Global, Regions, Countries, Titans. * **FACTSET MARKET INDICES** - Regional and Country Indices defined by FactSet * **FTSE** - FTSE Global, UK, Global All Cap, World, Xinhua, European, GWA, JSE, Multinationals, and Style indices * **GLOBAL INDICES** - A mix of major indices across the globe. * **MSCI** - MSCI All Country, Asia Pacific, Thematic & Strategy, Emerging, Developed, US. * **RUSSELL** - US, Global, and Nomura. * **S&P** - US, ASX, Select Industry, BMI, Global, Thematic, Emerging, TSX. * **STOXX** - Total Market, Europe, and Nordic * **TOPIX** - Topix Indices, such as TOPIX 500 (182301) (optional)
* @return BenchmarkIdListResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 List of sample Benchmark Ids -
400 Bad Request. This can occur for several reasons. Please review the \"message\" for more details. -
401 Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses. -
403 The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization. -
415 Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value. -
500 Internal Server Error. -
*/
public BenchmarkIdListResponse getBenchmarkIds(String familyFilter) throws ApiException {
return getBenchmarkIdsWithHttpInfo(familyFilter).getData();
}
/**
* Returns a sample list of Benchmark Identifiers and the benchmark categorization to use in other Benchmark API endpoints.
* Returns a **sample** list of Benchmark Identifiers to use in other Benchmark API endpoints. This is a supporting API to be use alongside the other Benchmark API endpoints. For example, use the fsymID value returned in this response as the input to your `ids` parameter in the /constituents endpoint to return constituents for that id.<p> *This is not the full list of benchmark ids allowed in this service, but rather a representation of the most commonly requested. For complete assistance with ID lookup or concordance services, please reach out to FactSet Support. *</p>
* @param familyFilter Highest Level Filter to search by common Benchmark Families, such as S&P, MSCI, or Russell. This will retrieve all related benchmark ids. For further filtering, use the response items such as the categoryDescription field. Leave blank if you wish to see a full sample list of ids. requested- * **CHINA & HK INDICES** - Major Hong Kong and China Indices, such as Hang Seng Index (HSI-HKX) * **DOW JONES** - Dow Jones Global, Regions, Countries, Titans. * **FACTSET MARKET INDICES** - Regional and Country Indices defined by FactSet * **FTSE** - FTSE Global, UK, Global All Cap, World, Xinhua, European, GWA, JSE, Multinationals, and Style indices * **GLOBAL INDICES** - A mix of major indices across the globe. * **MSCI** - MSCI All Country, Asia Pacific, Thematic & Strategy, Emerging, Developed, US. * **RUSSELL** - US, Global, and Nomura. * **S&P** - US, ASX, Select Industry, BMI, Global, Thematic, Emerging, TSX. * **STOXX** - Total Market, Europe, and Nordic * **TOPIX** - Topix Indices, such as TOPIX 500 (182301) (optional)
* @return ApiResponse<BenchmarkIdListResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 List of sample Benchmark Ids -
400 Bad Request. This can occur for several reasons. Please review the \"message\" for more details. -
401 Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses. -
403 The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization. -
415 Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value. -
500 Internal Server Error. -
*/
public ApiResponse getBenchmarkIdsWithHttpInfo(String familyFilter) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/id-list";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "familyFilter", familyFilter));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
BenchmarkIdListResponse
> apiResponse = apiClient.invokeAPI("HelperApi.getBenchmarkIds", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getBenchmarkIdsResponseTypeMap, false);
return apiResponse;
}
/**
* Returns a sample list of Benchmark Identifiers and the benchmark categorization to use in other Benchmark API endpoints.
* Returns a **sample** list of Benchmark Identifiers to use in other Benchmark API endpoints. This is a supporting API to be use alongside the other Benchmark API endpoints. For example, use the fsymID value returned in this response as the input to your `ids` parameter in the /constituents endpoint to return constituents for that id.<p> *This is not the full list of benchmark ids allowed in this service, but rather a representation of the most commonly requested. For complete assistance with ID lookup or concordance services, please reach out to FactSet Support.*</p>
* @param benchmarkIdListRequest Requests a sample list of identifiers that can be used in other Benchmarks API endpoints. (required)
* @return BenchmarkIdListResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 List of sample Benchmark Ids -
400 Bad Request. This can occur for several reasons. Please review the \"message\" for more details. -
401 Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses. -
403 The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization. -
415 Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value. -
500 Internal Server Error. -
*/
public BenchmarkIdListResponse getBenchmarkIdsForList(BenchmarkIdListRequest benchmarkIdListRequest) throws ApiException {
return getBenchmarkIdsForListWithHttpInfo(benchmarkIdListRequest).getData();
}
/**
* Returns a sample list of Benchmark Identifiers and the benchmark categorization to use in other Benchmark API endpoints.
* Returns a **sample** list of Benchmark Identifiers to use in other Benchmark API endpoints. This is a supporting API to be use alongside the other Benchmark API endpoints. For example, use the fsymID value returned in this response as the input to your `ids` parameter in the /constituents endpoint to return constituents for that id.<p> *This is not the full list of benchmark ids allowed in this service, but rather a representation of the most commonly requested. For complete assistance with ID lookup or concordance services, please reach out to FactSet Support.*</p>
* @param benchmarkIdListRequest Requests a sample list of identifiers that can be used in other Benchmarks API endpoints. (required)
* @return ApiResponse<BenchmarkIdListResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 List of sample Benchmark Ids -
400 Bad Request. This can occur for several reasons. Please review the \"message\" for more details. -
401 Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses. -
403 The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization. -
415 Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value. -
500 Internal Server Error. -
*/
public ApiResponse getBenchmarkIdsForListWithHttpInfo(BenchmarkIdListRequest benchmarkIdListRequest) throws ApiException {
Object localVarPostBody = benchmarkIdListRequest;
// verify the required parameter 'benchmarkIdListRequest' is set
if (benchmarkIdListRequest == null) {
throw new ApiException(400, "Missing the required parameter 'benchmarkIdListRequest' when calling getBenchmarkIdsForList");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/id-list";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
BenchmarkIdListResponse
> apiResponse = apiClient.invokeAPI("HelperApi.getBenchmarkIdsForList", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getBenchmarkIdsForListResponseTypeMap, false);
return apiResponse;
}
}