All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.factset.sdk.StreetAccountNews.api.HeadlinesApi Maven / Gradle / Ivy

The newest version!
package com.factset.sdk.StreetAccountNews.api;

import com.factset.sdk.StreetAccountNews.ApiException;
import com.factset.sdk.StreetAccountNews.ApiClient;
import com.factset.sdk.StreetAccountNews.ApiResponse;
import com.factset.sdk.StreetAccountNews.Configuration;
import com.factset.sdk.StreetAccountNews.Pair;

import jakarta.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import com.factset.sdk.StreetAccountNews.models.Error;
import com.factset.sdk.StreetAccountNews.models.HeadlinesRequest;
import com.factset.sdk.StreetAccountNews.models.HeadlinesRequestByView;
import com.factset.sdk.StreetAccountNews.models.HeadlinesResponse;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class HeadlinesApi {
  private ApiClient apiClient;

  public HeadlinesApi() {
    this(Configuration.getDefaultApiClient());
  }

  public HeadlinesApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }
  
  private static final Map getStreetAccountHeadlinesResponseTypeMap = new HashMap();
  static {
    getStreetAccountHeadlinesResponseTypeMap.put(200, new GenericType(){});
    getStreetAccountHeadlinesResponseTypeMap.put(400, new GenericType(){});
    getStreetAccountHeadlinesResponseTypeMap.put(401, new GenericType(){});
    getStreetAccountHeadlinesResponseTypeMap.put(404, new GenericType(){});
  }

  private static final Map getStreetAccountHeadlinesByViewResponseTypeMap = new HashMap();
  static {
    getStreetAccountHeadlinesByViewResponseTypeMap.put(200, new GenericType(){});
    getStreetAccountHeadlinesByViewResponseTypeMap.put(400, new GenericType(){});
    getStreetAccountHeadlinesByViewResponseTypeMap.put(401, new GenericType(){});
    getStreetAccountHeadlinesByViewResponseTypeMap.put(404, 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;
  }

  /**
   * Retrieve StreetAccount headlines for given filters
   * This endpoint will pull all headlines produced by StreetAccount and the full story body will be returned by the data set. Filters can be specified via the endpoint below. The attributes field in the request body can be used to specify which fields are returned in the response. If attributes are empty or not specified, the response does not omit attributes.
   * @param headlinesRequest /filters endpoint contains the filters associated with the optional parameters in the request body. (optional)
   * @return HeadlinesResponse
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
200 Returns the headlines and associated story information for given filters. -
400 Bad Request. This can occur for invalid parameter. -
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. -
404 Not Found -
429 Limit Exceeded * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Limit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Limit-Reset - Number of seconds remaining till rate limit resets.
*/ public HeadlinesResponse getStreetAccountHeadlines(HeadlinesRequest headlinesRequest) throws ApiException { return getStreetAccountHeadlinesWithHttpInfo(headlinesRequest).getData(); } /** * Retrieve StreetAccount headlines for given filters * This endpoint will pull all headlines produced by StreetAccount and the full story body will be returned by the data set. Filters can be specified via the endpoint below. The attributes field in the request body can be used to specify which fields are returned in the response. If attributes are empty or not specified, the response does not omit attributes. * @param headlinesRequest /filters endpoint contains the filters associated with the optional parameters in the request body. (optional) * @return ApiResponse<HeadlinesResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Returns the headlines and associated story information for given filters. -
400 Bad Request. This can occur for invalid parameter. -
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. -
404 Not Found -
429 Limit Exceeded * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Limit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Limit-Reset - Number of seconds remaining till rate limit resets.
*/ public ApiResponse getStreetAccountHeadlinesWithHttpInfo(HeadlinesRequest headlinesRequest) throws ApiException { Object localVarPostBody = headlinesRequest; // create path and map variables String localVarPath = "/headlines"; // 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< HeadlinesResponse > apiResponse = apiClient.invokeAPI("HeadlinesApi.getStreetAccountHeadlines", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getStreetAccountHeadlinesResponseTypeMap, false); return apiResponse; } /** * Retrieve StreetAccount headlines for given view * This endpoint allows you to pull all headlines produced by StreetAccount for a saved view. The full story body will be returned by the data set. Views can be created via the ‘Create Views’ endpoint. * @param headlinesRequestByView View body which needs to be sent with request (optional) * @return HeadlinesResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Returns the headlines and associated story information for given view. -
400 Bad Request. This can occur for invalid parameter. -
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. -
404 Not Found -
429 Limit Exceeded * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Limit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Limit-Reset - Number of seconds remaining till rate limit resets.
*/ public HeadlinesResponse getStreetAccountHeadlinesByView(HeadlinesRequestByView headlinesRequestByView) throws ApiException { return getStreetAccountHeadlinesByViewWithHttpInfo(headlinesRequestByView).getData(); } /** * Retrieve StreetAccount headlines for given view * This endpoint allows you to pull all headlines produced by StreetAccount for a saved view. The full story body will be returned by the data set. Views can be created via the ‘Create Views’ endpoint. * @param headlinesRequestByView View body which needs to be sent with request (optional) * @return ApiResponse<HeadlinesResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Returns the headlines and associated story information for given view. -
400 Bad Request. This can occur for invalid parameter. -
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. -
404 Not Found -
429 Limit Exceeded * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Limit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Limit-Reset - Number of seconds remaining till rate limit resets.
*/ public ApiResponse getStreetAccountHeadlinesByViewWithHttpInfo(HeadlinesRequestByView headlinesRequestByView) throws ApiException { Object localVarPostBody = headlinesRequestByView; // create path and map variables String localVarPath = "/headlines/view"; // 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< HeadlinesResponse > apiResponse = apiClient.invokeAPI("HeadlinesApi.getStreetAccountHeadlinesByView", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getStreetAccountHeadlinesByViewResponseTypeMap, false); return apiResponse; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy