Skip to content

Latest commit

 

History

History
130 lines (87 loc) · 3.53 KB

CurrenciesApi.md

File metadata and controls

130 lines (87 loc) · 3.53 KB

OpenAPI\Client\CurrenciesApi

All URIs are relative to https://api.pocketsmith.com/v2, except if the operation defines another base path.

Method HTTP request Description
currenciesGet() GET /currencies List currencies
currenciesIdGet() GET /currencies/{id} Get currency

currenciesGet()

currenciesGet(): \OpenAPI\Client\Model\Currency[]

List currencies

Lists currencies supported by PocketSmith.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: developerKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Developer-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Developer-Key', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\CurrenciesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->currenciesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CurrenciesApi->currenciesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\Currency[]

Authorization

developerKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

currenciesIdGet()

currenciesIdGet($id): \OpenAPI\Client\Model\Currency

Get currency

Gets a particular currency by its ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: developerKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Developer-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Developer-Key', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\CurrenciesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = nzd; // string | The unique identifier of the currency.

try {
    $result = $apiInstance->currenciesIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CurrenciesApi->currenciesIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string The unique identifier of the currency.

Return type

\OpenAPI\Client\Model\Currency

Authorization

developerKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]