Skip to content

Latest commit

 

History

History
116 lines (80 loc) · 3.59 KB

RegistrationApi.md

File metadata and controls

116 lines (80 loc) · 3.59 KB

Telstra_EventDetection.RegistrationApi

All URIs are relative to https://tapi.telstra.com

Method HTTP request Description
register POST /v1/eventdetection/events Register
unregister DELETE /v1/eventdetection/events/{eventType} Unregister

register

ResisterPhoneNumberList register(body)

Register

Register for an event

Example

from __future__ import print_function
import time
import Telstra_EventDetection
from Telstra_EventDetection.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: auth
configuration = Telstra_EventDetection.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = Telstra_EventDetection.RegistrationApi(Telstra_EventDetection.ApiClient(configuration))
body = Telstra_EventDetection.SubscriptionObj() # SubscriptionObj | Subscribe with a list of phone numbers, push notification URL (optional) and the event type.

try:
    # Register
    api_response = api_instance.register(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistrationApi->register: %s\n" % e)

Parameters

Name Type Description Notes
body SubscriptionObj Subscribe with a list of phone numbers, push notification URL (optional) and the event type.

Return type

ResisterPhoneNumberList

Authorization

auth

HTTP request headers

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

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

unregister

ResisterPhoneNumberList unregister(event_type, body)

Unregister

Unregister from an event

Example

from __future__ import print_function
import time
import Telstra_EventDetection
from Telstra_EventDetection.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: auth
configuration = Telstra_EventDetection.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = Telstra_EventDetection.RegistrationApi(Telstra_EventDetection.ApiClient(configuration))
event_type = 'event_type_example' # str | Event Type
body = Telstra_EventDetection.UnregisterRequestObj() # UnregisterRequestObj | List of subscribed phone numbers and notification URL (optional)

try:
    # Unregister
    api_response = api_instance.unregister(event_type, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistrationApi->unregister: %s\n" % e)

Parameters

Name Type Description Notes
event_type str Event Type
body UnregisterRequestObj List of subscribed phone numbers and notification URL (optional)

Return type

ResisterPhoneNumberList

Authorization

auth

HTTP request headers

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

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