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

com.factset.sdk.StreetAccountNews.api.ViewsApi 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.CreateOrEditViewBody;
import com.factset.sdk.StreetAccountNews.models.CreateViewResponse;
import com.factset.sdk.StreetAccountNews.models.DeleteViewBody;
import com.factset.sdk.StreetAccountNews.models.Error;
import com.factset.sdk.StreetAccountNews.models.QuickAlertsBody;
import com.factset.sdk.StreetAccountNews.models.QuickAlertsResponse;
import com.factset.sdk.StreetAccountNews.models.Views;

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

public class ViewsApi {
  private ApiClient apiClient;

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

  public ViewsApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }
  
  private static final Map createQuickAlertForViewResponseTypeMap = new HashMap();
  static {
    createQuickAlertForViewResponseTypeMap.put(201, new GenericType(){});
    createQuickAlertForViewResponseTypeMap.put(400, new GenericType(){});
    createQuickAlertForViewResponseTypeMap.put(404, new GenericType(){});
    createQuickAlertForViewResponseTypeMap.put(500, new GenericType(){});
  }

  private static final Map createStreetAccountViewResponseTypeMap = new HashMap();
  static {
    createStreetAccountViewResponseTypeMap.put(201, new GenericType(){});
    createStreetAccountViewResponseTypeMap.put(400, new GenericType(){});
    createStreetAccountViewResponseTypeMap.put(401, new GenericType(){});
    createStreetAccountViewResponseTypeMap.put(500, new GenericType(){});
  }

  private static final Map deleteQuickalertViewResponseTypeMap = new HashMap();

  private static final Map deleteStreetAccountViewResponseTypeMap = new HashMap();

  private static final Map editStreetAccountViewResponseTypeMap = new HashMap();

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

  /**
   * Creates a quick-alert for given saved view
   * This endpoint takes in a view name and provides realtime email updates on new stories coming in for the view. Only one quick alert can be enabled for a view at a time.  
   * @param quickAlertsBody View name to get an alert (optional)
   * @return QuickAlertsResponse
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
201 Creates quick-alert for view. -
400 Bad Request. This can occur for invalid parameter. -
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.
500 Internal Error -
*/ public QuickAlertsResponse createQuickAlertForView(QuickAlertsBody quickAlertsBody) throws ApiException { return createQuickAlertForViewWithHttpInfo(quickAlertsBody).getData(); } /** * Creates a quick-alert for given saved view * This endpoint takes in a view name and provides realtime email updates on new stories coming in for the view. Only one quick alert can be enabled for a view at a time. * @param quickAlertsBody View name to get an alert (optional) * @return ApiResponse<QuickAlertsResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 Creates quick-alert for view. -
400 Bad Request. This can occur for invalid parameter. -
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.
500 Internal Error -
*/ public ApiResponse createQuickAlertForViewWithHttpInfo(QuickAlertsBody quickAlertsBody) throws ApiException { Object localVarPostBody = quickAlertsBody; // create path and map variables String localVarPath = "/quick-alert/create"; // 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< QuickAlertsResponse > apiResponse = apiClient.invokeAPI("ViewsApi.createQuickAlertForView", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, createQuickAlertForViewResponseTypeMap, false); return apiResponse; } /** * Creates and saves a StreetAccount view * This endpoint allows you to create a new StreetAccount view. Select watchlists/tickers and filters of your choice to create and save a view. * @param createOrEditViewBody Create or Edit View Body which needs to be sent with request (optional) * @return CreateViewResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 Creates StreetAccount view for the provided 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. -
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.
500 Internal Server Error -
*/ public CreateViewResponse createStreetAccountView(CreateOrEditViewBody createOrEditViewBody) throws ApiException { return createStreetAccountViewWithHttpInfo(createOrEditViewBody).getData(); } /** * Creates and saves a StreetAccount view * This endpoint allows you to create a new StreetAccount view. Select watchlists/tickers and filters of your choice to create and save a view. * @param createOrEditViewBody Create or Edit View Body which needs to be sent with request (optional) * @return ApiResponse<CreateViewResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 Creates StreetAccount view for the provided 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. -
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.
500 Internal Server Error -
*/ public ApiResponse createStreetAccountViewWithHttpInfo(CreateOrEditViewBody createOrEditViewBody) throws ApiException { Object localVarPostBody = createOrEditViewBody; // create path and map variables String localVarPath = "/views/create"; // 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< CreateViewResponse > apiResponse = apiClient.invokeAPI("ViewsApi.createStreetAccountView", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, createStreetAccountViewResponseTypeMap, false); return apiResponse; } /** * Deletes an existing quick alert for a view. * This endpoint allows you to delete a quick alert from a previously saved view. * @param quickAlertsBody View name to get an alert (optional) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 Quick alert deleted. -
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. -
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.
500 Internal Server Error -
*/ public void deleteQuickalertView(QuickAlertsBody quickAlertsBody) throws ApiException { deleteQuickalertViewWithHttpInfo(quickAlertsBody); } /** * Deletes an existing quick alert for a view. * This endpoint allows you to delete a quick alert from a previously saved view. * @param quickAlertsBody View name to get an alert (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 Quick alert deleted. -
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. -
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.
500 Internal Server Error -
*/ public ApiResponse deleteQuickalertViewWithHttpInfo(QuickAlertsBody quickAlertsBody) throws ApiException { Object localVarPostBody = quickAlertsBody; // create path and map variables String localVarPath = "/quick-alert/delete"; // 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< Void > apiResponse = apiClient.invokeAPI("ViewsApi.deleteQuickalertView", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, deleteQuickalertViewResponseTypeMap, false); return apiResponse; } /** * Deletes an existing StreetAccount view * This endpoint allows you to delete a previously saved StreetAccount view. * @param deleteViewBody Delete View Body which needs to be sent with request (optional) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 No Content -
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. -
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.
500 Internal Server Error -
*/ public void deleteStreetAccountView(DeleteViewBody deleteViewBody) throws ApiException { deleteStreetAccountViewWithHttpInfo(deleteViewBody); } /** * Deletes an existing StreetAccount view * This endpoint allows you to delete a previously saved StreetAccount view. * @param deleteViewBody Delete View Body which needs to be sent with request (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 No Content -
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. -
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.
500 Internal Server Error -
*/ public ApiResponse deleteStreetAccountViewWithHttpInfo(DeleteViewBody deleteViewBody) throws ApiException { Object localVarPostBody = deleteViewBody; // create path and map variables String localVarPath = "/views/delete"; // 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< Void > apiResponse = apiClient.invokeAPI("ViewsApi.deleteStreetAccountView", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, deleteStreetAccountViewResponseTypeMap, false); return apiResponse; } /** * Edits and saves an existing StreetAccount view * This endpoint allows you to edit the criteria used for a previously saved StreetAccount view. * @param createOrEditViewBody Create or Edit View Body which needs to be sent with request (optional) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 No Content -
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. -
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.
500 Internal Server Error -
*/ public void editStreetAccountView(CreateOrEditViewBody createOrEditViewBody) throws ApiException { editStreetAccountViewWithHttpInfo(createOrEditViewBody); } /** * Edits and saves an existing StreetAccount view * This endpoint allows you to edit the criteria used for a previously saved StreetAccount view. * @param createOrEditViewBody Create or Edit View Body which needs to be sent with request (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 No Content -
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. -
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.
500 Internal Server Error -
*/ public ApiResponse editStreetAccountViewWithHttpInfo(CreateOrEditViewBody createOrEditViewBody) throws ApiException { Object localVarPostBody = createOrEditViewBody; // create path and map variables String localVarPath = "/views/update"; // 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< Void > apiResponse = apiClient.invokeAPI("ViewsApi.editStreetAccountView", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, editStreetAccountViewResponseTypeMap, false); return apiResponse; } /** * Retrieves StreetAccount search views * This endpoint allows you to pull the full list of StreetAccount views that have been previously saved. * @return Views * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Returns views. -
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. -
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.
500 Internal Server Error -
*/ public Views getStreetAccountViews() throws ApiException { return getStreetAccountViewsWithHttpInfo().getData(); } /** * Retrieves StreetAccount search views * This endpoint allows you to pull the full list of StreetAccount views that have been previously saved. * @return ApiResponse<Views> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Returns views. -
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. -
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.
500 Internal Server Error -
*/ public ApiResponse getStreetAccountViewsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/views"; // 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 = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" }; ApiResponse< Views > apiResponse = apiClient.invokeAPI("ViewsApi.getStreetAccountViews", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getStreetAccountViewsResponseTypeMap, false); return apiResponse; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy