Caller object

class terminusgps.twilio.caller.TwilioCaller[source]

Public Methods:

__init__()

Sets Twilio messaging session variables.

__enter__()

Creates an asyncronous Twilio client.

__exit__(exc_type, exc_value, exc_tb)

create_notification(to_number, message[, method])

Returns an awaitable notification task.

create_call(to_number, message)

Calls to_number and reads message aloud.

create_sms(to_number, message)

Texts message to to_number.


async create_call(to_number: str, message: str) None[source]

Calls to_number and reads message aloud.

Parameters:
  • to_number (str) – A phone number.

  • message (str) – A message to be read aloud.

Returns:

Nothing.

Return type:

None

async create_notification(to_number: str, message: str, method: str = 'sms') Task[Any][source]

Returns an awaitable notification task.

Available methods are "sms", "call" and "phone".

Parameters:
  • to_number (str) – A phone number to notify.

  • message (str) – A notification message.

  • method (str) – A notification method. Default is "sms".

Returns:

An awaitable task.

Return type:

Task

async create_sms(to_number: str, message: str) None[source]

Texts message to to_number.

Parameters:
  • to_number (str) – A phone number.

  • message (str) – A message to be texted.

Returns:

Nothing.

Return type:

None