Skip to content

Latest commit

 

History

History
325 lines (220 loc) · 9.25 KB

MessagesApi.md

File metadata and controls

325 lines (220 loc) · 9.25 KB

OpenAPI\Client\MessagesApi

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

Method HTTP request Description
createMessage() POST /messages Create a new message
deleteMessage() DELETE /messages/{id} Delete message
getMessageById() GET /messages/{id} Get message by id
getMessages() GET /messages Get messages
updateMessage() PUT /messages/{id} Updated message

createMessage()

createMessage($messages)

Create a new message

Create a new message. This can only be done by the logged in.

Example

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


// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\MessagesApi(
    // 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
);
$messages = new \OpenAPI\Client\Model\Messages(); // \OpenAPI\Client\Model\Messages | Created message object

try {
    $apiInstance->createMessage($messages);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->createMessage: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
messages \OpenAPI\Client\Model\Messages Created message object

Return type

void (empty response body)

Authorization

main_auth

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/problem+json

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

deleteMessage()

deleteMessage($id)

Delete message

This can only be done by the logged in return.

Example

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


// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\MessagesApi(
    // 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 = 'id_example'; // string | The id of the message that needs to be deleted

try {
    $apiInstance->deleteMessage($id);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->deleteMessage: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string The id of the message that needs to be deleted

Return type

void (empty response body)

Authorization

main_auth

HTTP request headers

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

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

getMessageById()

getMessageById($id): \OpenAPI\Client\Model\Messages

Get message by id

Some description of the operation. You can use Markdown here.

Example

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


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

// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\MessagesApi(
    // 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 = 'id_example'; // string | The id that needs to be fetched

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

Parameters

Name Type Description Notes
id string The id that needs to be fetched

Return type

\OpenAPI\Client\Model\Messages

Authorization

api_key, main_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

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

getMessages()

getMessages($limit, $offset, $order_direction): \OpenAPI\Client\Model\Messages

Get messages

Some description of the operation. You can use Markdown here.

Example

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


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

// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\MessagesApi(
    // 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
);
$limit = 3.4; // float | The number of items to return
$offset = 3.4; // float | Filter users without email
$order_direction = 'order_direction_example'; // string | Direction to return accounts

try {
    $result = $apiInstance->getMessages($limit, $offset, $order_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->getMessages: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
limit float The number of items to return
offset float Filter users without email
order_direction string Direction to return accounts

Return type

\OpenAPI\Client\Model\Messages

Authorization

api_key, main_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

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

updateMessage()

updateMessage($id, $messages)

Updated message

This can only be done by the logged in user.

Example

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


// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\MessagesApi(
    // 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 = 'id_example'; // string | The id that needs to be updated
$messages = new \OpenAPI\Client\Model\Messages(); // \OpenAPI\Client\Model\Messages | Updated message object

try {
    $apiInstance->updateMessage($id, $messages);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->updateMessage: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string The id that needs to be updated
messages \OpenAPI\Client\Model\Messages Updated message object

Return type

void (empty response body)

Authorization

main_auth

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/problem+json

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