app.cybrid.cybrid_api_bank.client.api.SymbolsBankApi Maven / Gradle / Ivy
package app.cybrid.cybrid_api_bank.client.api;
import app.cybrid.cybrid_api_bank.client.ApiClient;
import app.cybrid.cybrid_api_bank.client.model.ErrorResponseBankModel;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-11-15T16:37:52.482761Z[Etc/UTC]")
public class SymbolsBankApi {
private ApiClient apiClient;
public SymbolsBankApi() {
this(new ApiClient());
}
@Autowired
public SymbolsBankApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get Symbols list
* Retrieves a listing of symbols.
* 200 - get list of symbols
*
401 - Unauthorized - Authentication failed,
* @return List<String>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec listSymbolsRequestCreation() throws WebClientResponseException {
Object postBody = null;
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "BearerAuth", "oauth2" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/symbols", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get Symbols list
* Retrieves a listing of symbols.
* 200 - get list of symbols
*
401 - Unauthorized - Authentication failed,
* @return List<String>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux listSymbols() throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return listSymbolsRequestCreation().bodyToFlux(localVarReturnType);
}
public Mono>> listSymbolsWithHttpInfo() throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return listSymbolsRequestCreation().toEntityList(localVarReturnType);
}
}