Skip to content

Latest commit

 

History

History
85 lines (65 loc) · 2.59 KB

UtilitiesApi.md

File metadata and controls

85 lines (65 loc) · 2.59 KB

UtilitiesApi

All URIs are relative to https://api.egoiapp.com

Method HTTP request Description
getAllCountries GET /utilities/countries Get all countries

getAllCountries

CountryCollection getAllCountries(phone)

Get all countries

Returns all countries

Example

// Import classes:
import org.egoi.client.ApiClient;
import org.egoi.client.ApiException;
import org.egoi.client.Configuration;
import org.egoi.client.auth.*;
import org.egoi.client.models.*;
import org.egoi.client.api.UtilitiesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.egoiapp.com");
    
    // Configure API key authorization: Apikey
    ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
    Apikey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //Apikey.setApiKeyPrefix("Token");

    UtilitiesApi apiInstance = new UtilitiesApi(defaultClient);
    String phone = "phone_example"; // String | Phone number without country code to get all countries which can use that phone number
    try {
      CountryCollection result = apiInstance.getAllCountries(phone);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling UtilitiesApi#getAllCountries");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
phone String Phone number without country code to get all countries which can use that phone number [optional]

Return type

CountryCollection

Authorization

Apikey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
403 Forbidden -
408 Request Timeout -
422 Unprocessable Entity -
429 Too Many Requests -
500 Internal Server Error -
503 Service Unavailable -