Skip to content

The Telstra Event Detection API provides the ability to subscribe to and receive network events for a given set of mobile numbers

Notifications You must be signed in to change notification settings

telstra/EventDetectionAPI-SDK-java

Repository files navigation

Telstra_EventDetection

Requirements

Building the API client library requires Maven to be installed.

Installation

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.

Maven users

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>

Gradle users

Add this dependency to your project's build file:

compile "Telstra:Telstra_EventDetection:1.0.0"

Others

At first generate the JAR by executing:

Then manually install the following JARs:

  • target/Telstra_EventDetection-1.0.0.jar
  • target/lib/*.jar

Getting Started

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();
        }
    }
}

Documentation for API Endpoints

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

Documentation for Models

Documentation for Authorisation

Authentication schemes defined for the API:

auth

  • Type: OAuth
  • Flow: application
  • Authorisation URL:
  • Scopes:
    • v1_eventdetection_simswap: v1_eventdetection_simswap

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

The Telstra Event Detection API provides the ability to subscribe to and receive network events for a given set of mobile numbers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages