Skip to content

Latest commit

 

History

History
306 lines (222 loc) · 10.5 KB

ContactApi.md

File metadata and controls

306 lines (222 loc) · 10.5 KB

RadioManager\ContactApi

All URIs are relative to https://radiomanager.io/api/v2

Method HTTP request Description
createContact POST /contacts Create contact.
deleteContactById DELETE /contacts/{id} Delete contact by id
getContactById GET /contacts/{id} Get contact by id
listContacts GET /contacts Get all contacts.
updateContactByID PATCH /contacts/{id} Update contact by id

createContact

\RadioManager\Model\PostSuccess createContact($data)

Create contact.

Create contact.

Example

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

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

$apiInstance = new RadioManager\Api\ContactApi(
    // 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
);
$data = new \RadioManager\Model\ContactDataInput(); // \RadioManager\Model\ContactDataInput | Data **(Required)**

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

Parameters

Name Type Description Notes
data \RadioManager\Model\ContactDataInput Data (Required)

Return type

\RadioManager\Model\PostSuccess

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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

deleteContactById

\RadioManager\Model\Success deleteContactById($id)

Delete contact by id

Delete contact by id

Example

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

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

$apiInstance = new RadioManager\Api\ContactApi(
    // 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 = 789; // int | ID of Contact **(Required)**

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

Parameters

Name Type Description Notes
id int ID of Contact (Required)

Return type

\RadioManager\Model\Success

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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

getContactById

\RadioManager\Model\ContactResult getContactById($id, $_external_station_id)

Get contact by id

Get contact by id

Example

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

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

$apiInstance = new RadioManager\Api\ContactApi(
    // 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 = 789; // int | ID of Contact **(Required)**
$_external_station_id = 789; // int | Query on a different (content providing) station *(Optional)*

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

Parameters

Name Type Description Notes
id int ID of Contact (Required)
_external_station_id int Query on a different (content providing) station (Optional) [optional]

Return type

\RadioManager\Model\ContactResult

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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

listContacts

\RadioManager\Model\ContactResults listContacts($page, $item_id, $model_type_id, $tag_id, $limit, $order_by, $order_direction, $_external_station_id)

Get all contacts.

List all contacts.

Example

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

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

$apiInstance = new RadioManager\Api\ContactApi(
    // 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
);
$page = 1; // int | Current page *(Optional)*
$item_id = 789; // int | Search on Item ID *(Optional)* `(Relation)`
$model_type_id = 789; // int | Search on ModelType ID *(Optional)* `(Relation)`
$tag_id = 789; // int | Search on Tag ID *(Optional)* `(Relation)`
$limit = 789; // int | Results per page *(Optional)*
$order_by = "order_by_example"; // string | Field to order the results *(Optional)*
$order_direction = "order_direction_example"; // string | Direction of ordering *(Optional)*
$_external_station_id = 789; // int | Query on a different (content providing) station *(Optional)*

try {
    $result = $apiInstance->listContacts($page, $item_id, $model_type_id, $tag_id, $limit, $order_by, $order_direction, $_external_station_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ContactApi->listContacts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int Current page (Optional) [optional] [default to 1]
item_id int Search on Item ID (Optional) `(Relation)` [optional]
model_type_id int Search on ModelType ID (Optional) `(Relation)` [optional]
tag_id int Search on Tag ID (Optional) `(Relation)` [optional]
limit int Results per page (Optional) [optional]
order_by string Field to order the results (Optional) [optional]
order_direction string Direction of ordering (Optional) [optional]
_external_station_id int Query on a different (content providing) station (Optional) [optional]

Return type

\RadioManager\Model\ContactResults

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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

updateContactByID

\RadioManager\Model\Success updateContactByID($id, $data)

Update contact by id

Update contact by id

Example

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

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

$apiInstance = new RadioManager\Api\ContactApi(
    // 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 = 789; // int | ID of Contact **(Required)**
$data = new \RadioManager\Model\ContactDataInput(); // \RadioManager\Model\ContactDataInput | Data *(Optional)*

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

Parameters

Name Type Description Notes
id int ID of Contact (Required)
data \RadioManager\Model\ContactDataInput Data (Optional) [optional]

Return type

\RadioManager\Model\Success

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

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