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(): \OpenAPI\Client\Model\Currency[]
List currencies
Lists currencies supported by PocketSmith.
<?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;
}
This endpoint does not need any parameter.
\OpenAPI\Client\Model\Currency[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
currenciesIdGet($id): \OpenAPI\Client\Model\Currency
Get currency
Gets a particular currency by its ID.
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The unique identifier of the currency. |
\OpenAPI\Client\Model\Currency
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]