Tabnine Logo
ApiClient.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
io.swagger.client.ApiClient
constructor

Best Java code snippets using io.swagger.client.ApiClient.<init> (Showing top 9 results out of 315)

origin: de.adorsys.multibanking/onlinebanking-finapi

private ApiClient createUserApiClient() {
  ApiClient apiClient = new ApiClient();
  apiClient.setBasePath(finapiConnectionUrl);
  return apiClient;
}
origin: de.adorsys.multibanking/onlinebanking-finapi

private ApiClient createApiClient() {
  ApiClient apiClient = new ApiClient();
  apiClient.setBasePath(finapiConnectionUrl);
  apiClient.setAccessToken(clientToken != null ? clientToken.getAccessToken() : null);
  return apiClient;
}
origin: mercadolibre/java-sdk

@Test(expected = ApiException.class)
public void refreshTokenTestFailsIfRefreshTokenIsInvalid() throws ApiException {
  DefaultApi api = new DefaultApi(new ApiClient(), clientId, clientSecret);
  String refreshToken = "1232131";
  api.refreshAccessToken(refreshToken);
}
origin: mercadolibre/java-sdk

@Test(expected = ApiException.class)
public void authorizeTestFailsIfCodeIsNull() throws ApiException {
  DefaultApi api = new DefaultApi(new ApiClient(), clientId, clientSecret);
  String code = null;
  api.authorize(code, redirectUri);
}
origin: mercadolibre/java-sdk

@Test(expected = ApiException.class)
public void authorizeTestFailsIfCodeIsInvalid() throws ApiException {
  DefaultApi api = new DefaultApi(new ApiClient(), clientId, clientSecret);
  String code = "12321321";
  api.authorize(code, redirectUri);
}
origin: mercadolibre/java-sdk

@Test(expected = ApiException.class)
public void getAuthUrlTestFailsIfRedirectUriIsNull() throws ApiException {
  String redirectUri = null;
  DefaultApi api = new DefaultApi(new ApiClient(), clientId, clientSecret);
  api.getAuthUrl(redirectUri, Configuration.AuthUrls.MLA);
  StringBuilder sb = new StringBuilder();
  sb.append(Configuration.AuthUrls.MLA.getValue());
  sb.append("/authorization?response_type=code&client_id=");
  sb.append(clientId);
  sb.append("&redirect_uri=");
  try {
    sb.append(URLEncoder.encode(redirectUri, "UTF-8"));
  } catch (UnsupportedEncodingException e) {
    sb.append(redirectUri);
  }
}
origin: mercadolibre/java-sdk

/**
 * Returns auth Url
 */
@Test
public void getAuthUrlTest() throws ApiException {
  DefaultApi api = new DefaultApi(new ApiClient(), clientId, clientSecret);
  String response = api.getAuthUrl(redirectUri, Configuration.AuthUrls.MLA);
  StringBuilder sb = new StringBuilder();
  sb.append(Configuration.AuthUrls.MLA.getValue());
  sb.append("/authorization?response_type=code&client_id=");
  sb.append(clientId);
  sb.append("&redirect_uri=");
  try {
    sb.append(URLEncoder.encode(redirectUri, "UTF-8"));
  } catch (UnsupportedEncodingException e) {
    sb.append(redirectUri);
  }
  assertNotNull(response);
  assertEquals(sb.toString(), response);
}
origin: mercadolibre/java-sdk

/**
 * Returns access token.
 *
 * @throws ApiException if the Api call fails
 */
@Test
public void authorizeTest() throws ApiException {
  DefaultApi api = new DefaultApi(new ApiClient(), clientId, clientSecret);
  String code = "";
  AccessToken response = api.authorize(code, redirectUri);
  assertNotNull(response);
  assertNotNull(response.getAccess_token());
  assertEquals("bearer", response.getToken_type());
}
origin: mercadolibre/java-sdk

/**
 * Returns refresh token
 *
 * @throws ApiException if the Api call fails
 */
@Test
public void refreshTokenTest() throws ApiException {
  DefaultApi api = new DefaultApi(new ApiClient(), clientId, clientSecret);
  String refreshToken = "";
  RefreshToken response = api.refreshAccessToken(refreshToken);
  assertNotNull(response);
  assertNotNull(response.getAccess_token());
  assertEquals("bearer", response.getToken_type());
}
io.swagger.clientApiClient<init>

Popular methods of ApiClient

  • addDefaultHeader
    Add a default header.
  • deserialize
    Deserialize response body to Java object, according to the return type and the Content-Type response
  • escapeString
    Escape the given string to be used as URL query value.
  • parameterToPairs
    Formats the specified collection query parameters to a list of Pair objects. Note that the values of
  • parameterToString
    Format the given parameter object into string.
  • selectHeaderAccept
    Select the Accept header's value from the given accepts array: if JSON exists in the given array, us
  • selectHeaderContentType
    Select the Content-Type header's value from the given array: if JSON exists in the given array, use
  • serialize
    Serialize the given Java object into request body according to the object's class and the request Co
  • setUserAgent
    Set the User-Agent header's value (by adding to the default header map).
  • updateParamsForAuth
    Update query and header parameters based on authentication settings.
  • applySslSettings
    Apply SSL related settings to httpClient according to the current values of verifyingSsl and sslCaCe
  • buildCall
    Build HTTP call with the given options.
  • applySslSettings,
  • buildCall,
  • buildRequest,
  • buildRequestBodyFormEncoding,
  • buildRequestBodyMultipart,
  • buildUrl,
  • downloadFileFromResponse,
  • execute,
  • executeAsync

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Collectors (java.util.stream)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JPanel (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now