- API version: 1.0.0
- Package version: 1.0.0
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/Telstra/Telstra_EventDetection.git"
}
],
"require": {
"Telstra/Telstra_EventDetection": "*"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Telstra_EventDetection\Api\AuthenticationApi(
// 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()
);
$client_id = "client_id_example"; // string |
$client_secret = "client_secret_example"; // string |
$grant_type = "client_credentials"; // string |
try {
$result = $apiInstance->authToken($client_id, $client_secret, $grant_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationApi->authToken: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://tapi.telstra.com
Class | Method | HTTP request | Description |
---|---|---|---|
AuthenticationApi | authToken | POST /v2/oauth/token | Generate authentication token |
GetSubscriptionApi | getSubscription | POST /v1/eventdetection/events/subscriptions | Get Event Subscriptions |
LongPollApi | longpoll | POST /v1/eventdetection/events/{eventType} | Poll events |
PushNotificationsApi | pushNotifications | POST /v1/eventdetection/events/notifications | Push event notifications |
RegistrationApi | register | POST /v1/eventdetection/events | Register |
RegistrationApi | unregister | DELETE /v1/eventdetection/events/{eventType} | Unregister |
- Eventsattr
- GetEventResponse
- GetSubscriptionResponse
- NotificationPayload
- OAuthResponse
- PhoneNumberList
- PollingObj
- ResisterPhoneNumberList
- SubscriptionObj
- Subscriptionattr
- Test
- UnregisterRequestObj
- Type: OAuth
- Flow: application
- Authorisation URL:
- Scopes:
- v1_eventdetection_simswap: v1_eventdetection_simswap