\CallFire\Api\Rest\ClientBroadcast

Summary

Methods
Properties
Constants
CreateBroadcast()
QueryBroadcasts()
GetBroadcast()
UpdateBroadcast()
GetBroadcastStats()
ControlBroadcast()
QueryContactBatches()
GetContactBatch()
ControlContactBatch()
CreateBroadcastSchedule()
QueryBroadcastSchedule()
GetBroadcastSchedule()
DeleteBroadcastSchedule()
CreateContactBatch()
ns()
request()
response()
get()
post()
put()
delete()
buildQuery()
buildPostData()
getBasePath()
setBasePath()
getUsername()
setUsername()
getPassword()
setPassword()
getHttpClone()
getHttp()
setHttp()
getUri()
No public properties found
AMCONFIG_AM_ONLY
AMCONFIG_AM_AND_LIVE
AMCONFIG_LIVE_WITH_AMD
AMCONFIG_LIVE_IMMEDIATE
BROADCAST_VOICE
BROADCAST_IVR
BROADCAST_TEXT
COMMAND_START
COMMAND_STOP
COMMAND_ARCHIVE
EVENT_UNDEFINED_EVENT
EVENT_INBOUND_CALL_FINISHED
EVENT_INBOUND_TEXT_FINISHED
EVENT_OUTBOUND_CALL_FINISHED
EVENT_OUTBOUND_TEXT_FINISHED
EVENT_CAMPAIGN_STARTED
EVENT_CAMPAIGN_STOPPED
EVENT_CAMPAIGN_FINISHED
FEATURE_UNSUPPORTED
FEATURE_PENDING
FEATURE_DISABLED
FEATURE_ENABLED
FORMAT_XML
FORMAT_JSON
FORMAT_SOAP
FORMAT_EMAIL
INBOUND_TRACKING
INBOUND_IVR
RESULT_ANSWER_MACHINE
RESULT_BUSY
RESULT_DO_NOT_CALL
RESULT_TRANSFER
RESULT_TRANSFER_LEG
RESULT_NO_ANSWER
RESULT_UNDIALED
RESULT_SENT
RESULT_RECEIVED
RESULT_DID_NOT_TRY
RESULT_TOO_BIG
RESULT_INTERNAL_ERROR
RESULT_CARRIER_ERROR
RESULT_CARRIER_TEMP_ERROR
STATE_READY
STATE_SELECTED
STATE_FINISHED
STATE_DO_NOT_CALL
STATE_DUPLICATE
STATE_INVALID
STATE_TIMEOUT
STRATEGY_SEND_MULTIPLE
STRATEGY_DO_NOT_SEND
STRATEGY_TRIM
updateCredentials()
$basePath
$username
$password
$http
N/A
No private methods found
No private properties found
N/A

Constants

AMCONFIG_AM_ONLY

AMCONFIG_AM_ONLY

AMCONFIG_AM_AND_LIVE

AMCONFIG_AM_AND_LIVE

AMCONFIG_LIVE_WITH_AMD

AMCONFIG_LIVE_WITH_AMD

AMCONFIG_LIVE_IMMEDIATE

AMCONFIG_LIVE_IMMEDIATE

BROADCAST_VOICE

BROADCAST_VOICE

BROADCAST_IVR

BROADCAST_IVR

BROADCAST_TEXT

BROADCAST_TEXT

COMMAND_START

COMMAND_START

COMMAND_STOP

COMMAND_STOP

COMMAND_ARCHIVE

COMMAND_ARCHIVE

EVENT_UNDEFINED_EVENT

EVENT_UNDEFINED_EVENT

EVENT_INBOUND_CALL_FINISHED

EVENT_INBOUND_CALL_FINISHED

EVENT_INBOUND_TEXT_FINISHED

EVENT_INBOUND_TEXT_FINISHED

EVENT_OUTBOUND_CALL_FINISHED

EVENT_OUTBOUND_CALL_FINISHED

EVENT_OUTBOUND_TEXT_FINISHED

EVENT_OUTBOUND_TEXT_FINISHED

EVENT_CAMPAIGN_STARTED

EVENT_CAMPAIGN_STARTED

EVENT_CAMPAIGN_STOPPED

EVENT_CAMPAIGN_STOPPED

EVENT_CAMPAIGN_FINISHED

EVENT_CAMPAIGN_FINISHED

FEATURE_UNSUPPORTED

FEATURE_UNSUPPORTED

FEATURE_PENDING

FEATURE_PENDING

FEATURE_DISABLED

FEATURE_DISABLED

FEATURE_ENABLED

FEATURE_ENABLED

FORMAT_XML

FORMAT_XML

FORMAT_JSON

FORMAT_JSON

FORMAT_SOAP

FORMAT_SOAP

FORMAT_EMAIL

FORMAT_EMAIL

INBOUND_TRACKING

INBOUND_TRACKING

INBOUND_IVR

INBOUND_IVR

RESULT_ANSWER_MACHINE

RESULT_ANSWER_MACHINE

RESULT_BUSY

RESULT_BUSY

RESULT_DO_NOT_CALL

RESULT_DO_NOT_CALL

RESULT_TRANSFER

RESULT_TRANSFER

RESULT_TRANSFER_LEG

RESULT_TRANSFER_LEG

RESULT_NO_ANSWER

RESULT_NO_ANSWER

RESULT_UNDIALED

RESULT_UNDIALED

RESULT_SENT

RESULT_SENT

RESULT_RECEIVED

RESULT_RECEIVED

RESULT_DID_NOT_TRY

RESULT_DID_NOT_TRY

RESULT_TOO_BIG

RESULT_TOO_BIG

RESULT_INTERNAL_ERROR

RESULT_INTERNAL_ERROR

RESULT_CARRIER_ERROR

RESULT_CARRIER_ERROR

RESULT_CARRIER_TEMP_ERROR

RESULT_CARRIER_TEMP_ERROR

STATE_READY

STATE_READY

STATE_SELECTED

STATE_SELECTED

STATE_FINISHED

STATE_FINISHED

STATE_DO_NOT_CALL

STATE_DO_NOT_CALL

STATE_DUPLICATE

STATE_DUPLICATE

STATE_INVALID

STATE_INVALID

STATE_TIMEOUT

STATE_TIMEOUT

STRATEGY_SEND_MULTIPLE

STRATEGY_SEND_MULTIPLE

STRATEGY_DO_NOT_SEND

STRATEGY_DO_NOT_SEND

STRATEGY_TRIM

STRATEGY_TRIM

Properties

$basePath

$basePath

$username

$username

$password

$password

$http

$http

Methods

CreateBroadcast()

CreateBroadcast(\CallFire\Api\Rest\Request\CreateBroadcast $CreateBroadcast)

Creates a new Broadcast

This operation creates a Broadcast campaign and returns a broadcastId. To see the status of this campaign call GetBroadcast with the returned broadcastId. There are 3 types of Broadcast: TEXT, IVR, or VOICE. Select the appropriate config to match the broadcast type, TextBroadcastConfig, IvrBroadcastConfig, or VoiceBroadcastConfig. Prefer the Text Service operations (ex: SendText) and Call Service operations (ex: SendCall) over this operation when managing simple text and call campaigns since those operations are simpler and more concise.

Parameters

\CallFire\Api\Rest\Request\CreateBroadcast $CreateBroadcast

= null

QueryBroadcasts()

QueryBroadcasts(\CallFire\Api\Rest\Request\QueryBroadcasts $QueryBroadcasts)

Lists existing Broadcasts

Use this operation to see the status of Broadcasts in account. Filter by type of campaign whether currently running. Returns a list of Broadcast info such as campaign name, type, status, ect...

Parameters

\CallFire\Api\Rest\Request\QueryBroadcasts $QueryBroadcasts

= null

GetBroadcast()

GetBroadcast(int $Id)

Gets a single Broadcast by ID

Use ID returned from CreateBroadcast or from QueryBroadcast to retreive information on indivual Broadcast. Include info such as campaign name, type, status, ect...

Parameters

int $Id

Unique ID of resource

UpdateBroadcast()

UpdateBroadcast(int $Id, \CallFire\Api\Rest\Request\UpdateBroadcast $UpdateBroadcast)

Updates an existing Broadcast's configuration

Update existing broadcast's configuration such as time zone restrictions or retry logic. Currently all fields from config are updated so the 'Message' field needs to be populated just like in CreateBroadcast operation. Use unique ID to specify broadcast. Need to provide dummy 'Name' field Broadcast even though the field will not be overwritten.

Parameters

int $Id
\CallFire\Api\Rest\Request\UpdateBroadcast $UpdateBroadcast

GetBroadcastStats()

GetBroadcastStats(int $Id, \CallFire\Api\Rest\Request\GetBroadcastStats $GetBroadcastStats)

Gets performance and result statistics for a Broadcast

Get broadcast stats by broadcastId or by interval range. Stats include information like billed amount, billed duration, actions count, attempt count, etc...

Parameters

int $Id

Unique ID of resource

\CallFire\Api\Rest\Request\GetBroadcastStats $GetBroadcastStats

ControlBroadcast()

ControlBroadcast(int $Id, \CallFire\Api\Rest\Request\ControlBroadcast $ControlBroadcast)

Starts, Stops or Archives a Broadcast

Apply command START, STOP, or ARCHIVE to Broadcast. Also can change the max active count of Broadcast.

Parameters

int $Id
\CallFire\Api\Rest\Request\ControlBroadcast $ControlBroadcast

QueryContactBatches()

QueryContactBatches(\CallFire\Api\Rest\Request\QueryContactBatches $QueryContactBatches)

Lists a Broadcast's ContactBatch

Return list of Contact Batches associated with this Broadcast. The contactBatchIds returned from this campaign can then be used to enable, disable, or delete the individual Batches.

Parameters

\CallFire\Api\Rest\Request\QueryContactBatches $QueryContactBatches

= null

GetContactBatch()

GetContactBatch(int $Id)

Gets a ContactBatch by ID

Retrieve info on individual Contact Batch using contactId returned from CreateContactBatch

Parameters

int $Id

Unique ID of resource

ControlContactBatch()

ControlContactBatch(int $Id, \CallFire\Api\Rest\Request\ControlContactBatch $ControlContactBatch)

Enables or Disables a Broadcast's ContactBatch

This operation provides the ability to enable or disable on a Broadcast the list of contacts associated with a ContactBatch.

Parameters

int $Id
\CallFire\Api\Rest\Request\ControlContactBatch $ControlContactBatch

CreateBroadcastSchedule()

CreateBroadcastSchedule(\CallFire\Api\Rest\Request\CreateBroadcastSchedule $CreateBroadcastSchedule)

Creates a new Schedule for a Broadcast

Broadcast can be set to run at scheduled times a prescribed by BroadcastSchedule. Can pick start time, stop time, begin date, and day of week. Returns broadcastScheduleId that can be used in GetBroadcastSchedule and DeleteBroadcastSchedule

Parameters

\CallFire\Api\Rest\Request\CreateBroadcastSchedule $CreateBroadcastSchedule

= null

QueryBroadcastSchedule()

QueryBroadcastSchedule(\CallFire\Api\Rest\Request\QueryBroadcastSchedule $QueryBroadcastSchedule)

Lists existing BroadcastSchedules

List information about Broadcast Schedules attached to a Broadcast.

Parameters

\CallFire\Api\Rest\Request\QueryBroadcastSchedule $QueryBroadcastSchedule

= null

GetBroadcastSchedule()

GetBroadcastSchedule(int $Id)

Gets a BroadcastSchedule by ID

List information about individual Broadcast Schedule attached to a Broadcast.

Parameters

int $Id

Unique ID of resource

DeleteBroadcastSchedule()

DeleteBroadcastSchedule(int $Id)

Deletes a BroadcastSchedule by ID

Delete BroadcastSchedule associated with a Broadcast.

Parameters

int $Id

Unique ID of resource

CreateContactBatch()

CreateContactBatch(int $id, \CallFire\Api\Rest\Request\CreateContactBatch $CreateContactBatch)

Creates a new ContactBatch

Contact Batch is a list of contacts to associate with a broadcast. Use this operation to attach a list of contacts to an existing Campaign. A list of ToNumbers or an existing Contact List ID is required to create and attach the Contact List. Returned is the unique contactListId that can be used in ControlContactBatch to enable or disable this batch.

Parameters

int $id
\CallFire\Api\Rest\Request\CreateContactBatch $CreateContactBatch

= null

ns()

ns()

request()

request(string $type) : mixed

Instantiate a request object of the given type

Parameters

string $type

Request type

Returns

mixed —

Request object

response()

response(string $data, string $type) : mixed

Parse a response into a response type

Parameters

string $data

Response data to be parsed

string $type

= 'xml' Response format

Returns

mixed —

Response object

get()

get(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a GET request against an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

post()

post(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a POST request against an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

put()

put(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a PUT request against an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

delete()

delete(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a DELETE request again an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

buildQuery()

buildQuery(string $uri, array $parameters) : string

Build a request URI for a GET request

Parameters

string $uri

Endpoint URI

array $parameters

Key-value query parameters

Returns

string —

The resulting URL

buildPostData()

buildPostData(array $parameters) : string

Construct the POST fields data for a POST/PUT request, according to CallFire conventions

Reformats any array parameters to be a space-concatenated list of items. Any object parameters will be casted to a string, as possible.

Parameters

array $parameters

POST data

Returns

string —

Encoded POST data

getBasePath()

getBasePath()

setBasePath()

setBasePath( $basePath)

Parameters

$basePath

getUsername()

getUsername()

setUsername()

setUsername( $username)

Parameters

$username

getPassword()

getPassword()

setPassword()

setPassword( $password)

Parameters

$password

getHttpClone()

getHttpClone()

getHttp()

getHttp()

getUri()

getUri( $path,  $parameters)

Parameters

$path
$parameters

updateCredentials()

updateCredentials() : void

Rehashes the HTTP Basic Authentication on the HTTP client