Building the API client library requires Maven to be installed.
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>Telstra</groupId>
<artifactId>Telstra_EventDetection</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "Telstra:Telstra_EventDetection:1.0.0"
At first generate the JAR by executing:
Then manually install the following JARs:
- target/Telstra_EventDetection-1.0.0.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.telstra.*;
import com.telstra.auth.*;
import com.telstra.eventdetection.*;
import com.telstra.eventdetection.AuthenticationApi;
import java.io.File;
import java.util.*;
public class AuthenticationApiExample {
public static void main(String[] args) {
AuthenticationApi apiInstance = new AuthenticationApi();
String clientId = "clientId_example"; // String |
String clientSecret = "clientSecret_example"; // String |
String grantType = "client_credentials"; // String |
try {
OAuthResponse result = apiInstance.authToken(clientId, clientSecret, grantType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthenticationApi#authToken");
e.printStackTrace();
}
}
}
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
- PushNotificationObj
- ResisterPhoneNumberList
- ServiceEventsAttr
- SubscriptionObj
- Subscriptionattr
- Test
- UnregisterRequestObj
Authentication schemes defined for the API:
- Type: OAuth
- Flow: application
- Authorisation URL:
- Scopes:
- v1_eventdetection_simswap: v1_eventdetection_simswap
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.