com.factset.sdk.FactSetPeople.api.ProfilesApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of factsetpeople Show documentation
Show all versions of factsetpeople Show documentation
FactSet SDK for Java - factsetpeople
package com.factset.sdk.FactSetPeople.api;
import com.factset.sdk.FactSetPeople.ApiException;
import com.factset.sdk.FactSetPeople.ApiClient;
import com.factset.sdk.FactSetPeople.ApiResponse;
import com.factset.sdk.FactSetPeople.Configuration;
import com.factset.sdk.FactSetPeople.Pair;
import jakarta.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import com.factset.sdk.FactSetPeople.models.ErrorResponse;
import com.factset.sdk.FactSetPeople.models.PeopleProfilesRequest;
import com.factset.sdk.FactSetPeople.models.PeopleProfilesResponse;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ProfilesApi {
private ApiClient apiClient;
public ProfilesApi() {
this(Configuration.getDefaultApiClient());
}
public ProfilesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
private static final Map getPeopleProfilesResponseTypeMap = new HashMap();
static {
getPeopleProfilesResponseTypeMap.put(200, new GenericType(){});
getPeopleProfilesResponseTypeMap.put(400, new GenericType(){});
getPeopleProfilesResponseTypeMap.put(401, new GenericType(){});
getPeopleProfilesResponseTypeMap.put(403, new GenericType(){});
getPeopleProfilesResponseTypeMap.put(415, new GenericType(){});
getPeopleProfilesResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getPeopleProfilesForListResponseTypeMap = new HashMap();
static {
getPeopleProfilesForListResponseTypeMap.put(200, new GenericType(){});
getPeopleProfilesForListResponseTypeMap.put(400, new GenericType(){});
getPeopleProfilesForListResponseTypeMap.put(401, new GenericType(){});
getPeopleProfilesForListResponseTypeMap.put(403, new GenericType(){});
getPeopleProfilesForListResponseTypeMap.put(415, new GenericType(){});
getPeopleProfilesForListResponseTypeMap.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;
}
/**
* Return information about the person with the specified entity ID.
* Returns a summary of basic information about the person referenced by the entityId specified in the URI.
* @param ids List of FactSet Person Entity identifier. (required)
* @return PeopleProfilesResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 Array of Profile Ojects -
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 PeopleProfilesResponse getPeopleProfiles(java.util.List ids) throws ApiException {
return getPeopleProfilesWithHttpInfo(ids).getData();
}
/**
* Return information about the person with the specified entity ID.
* Returns a summary of basic information about the person referenced by the entityId specified in the URI.
* @param ids List of FactSet Person Entity identifier. (required)
* @return ApiResponse<PeopleProfilesResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 Array of Profile Ojects -
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 getPeopleProfilesWithHttpInfo(java.util.List ids) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ids' is set
if (ids == null) {
throw new ApiException(400, "Missing the required parameter 'ids' when calling getPeopleProfiles");
}
// create path and map variables
String localVarPath = "/factset-people/v1/profiles";
// 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("csv", "ids", ids));
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<
PeopleProfilesResponse
> apiResponse = apiClient.invokeAPI("ProfilesApi.getPeopleProfiles", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getPeopleProfilesResponseTypeMap, false);
return apiResponse;
}
/**
* Returns profile information for a large list of people.
*
* @param peopleProfilesRequest (required)
* @return PeopleProfilesResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 Array of People Profile Objects -
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 PeopleProfilesResponse getPeopleProfilesForList(PeopleProfilesRequest peopleProfilesRequest) throws ApiException {
return getPeopleProfilesForListWithHttpInfo(peopleProfilesRequest).getData();
}
/**
* Returns profile information for a large list of people.
*
* @param peopleProfilesRequest (required)
* @return ApiResponse<PeopleProfilesResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 Array of People Profile Objects -
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 getPeopleProfilesForListWithHttpInfo(PeopleProfilesRequest peopleProfilesRequest) throws ApiException {
Object localVarPostBody = peopleProfilesRequest;
// verify the required parameter 'peopleProfilesRequest' is set
if (peopleProfilesRequest == null) {
throw new ApiException(400, "Missing the required parameter 'peopleProfilesRequest' when calling getPeopleProfilesForList");
}
// create path and map variables
String localVarPath = "/factset-people/v1/profiles";
// 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<
PeopleProfilesResponse
> apiResponse = apiClient.invokeAPI("ProfilesApi.getPeopleProfilesForList", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getPeopleProfilesForListResponseTypeMap, false);
return apiResponse;
}
}