Overview

Namespaces

  • None
  • PHP
  • SMSJuiceAPI

Classes

  • ContactGroup
  • Message
  • TextMessagingService
  • Overview
  • Namespace
  • Class
  • Tree

Class TextMessagingService

Namespace: SMSJuiceAPI
Located at SMSJuice-API/TextMessagingService.php
Methods summary
public static String
# getCredit( type $key, type $secret )

Returns the amount of credit left on the account

Returns the amount of credit left on the account

Parameters

$key
API Key found in the settings section of your account
$secret
API Secret found in the settings section of your account

Returns

String
JSON with the value of credit left
public static String
# getBalance( type $key, type $secret )

Returns the cash balance on your account in your registered currency

Returns the cash balance on your account in your registered currency

Parameters

$key
API Key found in the settings section of your account
$secret
API Secret found in the settings section of your account

Returns

String
JSON with the balance value
public static String
# getAllGroups( type $key, type $secret )

Returns a list of all the contact groups on your account

Returns a list of all the contact groups on your account

Parameters

$key
API Key found in the settings section of your account
$secret
API Secret found in the settings section of your account

Returns

String
JSON with the list of all the contact groups on your account
public static String
# getAllGroupContacts( type $key, type $secret, type $groupName )

Returns all the contacts in a given group. It returns them with contact name and number.

Returns all the contacts in a given group. It returns them with contact name and number.

Parameters

$key
API Key found in the settings section of your account
$secret
API Secret found in the settings section of your account
$groupName
The name of the group whose contacts are to be returned

Returns

String
JSON with all the names and numbers in the group queried
public static String
# deleteGroup( type $key, type $secret, type $groupName )

Deletes a group on your account on SMSJuice

Deletes a group on your account on SMSJuice

Parameters

$key
API Key found in the settings section of your account
$secret
API Secret found in the settings section of your account
$groupName
Name of the group to be deleted

Returns

String
JSON string with the final status of the delete task.
public static String
# deleteContactFromGroup( type $key, type $secret, type $groupName, type $contactNumber )

Delete a contact from a contacts group

Delete a contact from a contacts group

Parameters

$key
API Key found in the settings section of your account
$secret
API Secret found in the settings section of your account
$groupName
Name of the group from which the contact will be deleted
$contactNumber
Number of the contact to be deleted

Returns

String
JSON string with the final status of the delete task.
public static String
# sendMessage( SMSJuiceAPI\Message $message )

Send a message to the intended recipients through the SMSJuice HTTP API

Send a message to the intended recipients through the SMSJuice HTTP API

Parameters

$message
Message object containing all the information for sending to the API

Returns

String
JSON with the final status of the sending task
public static String
# getMessageReport( type $key, type $secret, type $messageId )

Returns a message report detailing the sending times, delivery times, and delivery status of a message

Returns a message report detailing the sending times, delivery times, and delivery status of a message

Parameters

$key
API Key found in the settings section of your account
$secret
API Secret found in the settings section of your account
$messageId
Message ID of the message for which a report is required

Returns

String
JSON report showing the message sending and delivery status
public static String
# addGroup( SMSJuiceAPI\ContactGroup $contactGroup )

Add a ne contacts group onto one's SMSJuice account, just as one would if they were to login on our web interface

Add a ne contacts group onto one's SMSJuice account, just as one would if they were to login on our web interface

Parameters

$contactGroup
ContactGroup object containing the group name, contact numbers (if any) and credentials to add the group

Returns

String
JSON showing the final status of the addGroup operation
public static String
# addContactToGroup( SMSJuiceAPI\ContactGroup $contactGroupToAddTo )

Add contacts (names & numbers OR just a numbers, or both) to an existing group on your SMSJuice account

Add contacts (names & numbers OR just a numbers, or both) to an existing group on your SMSJuice account

Parameters

$contactGroupToAddTo
ContactGroup object containing the contacts to add to the existing group

Returns

String
JSON showing the final status of the addContactToGroup operation
Constants summary
string API_URL
# "https://api.smsjuice.com"
string SEND_URI
# "/send"
string GROUPS_URI
# "/groups"
string CONTACTS_URI
# "/groups/contacts"
string GET_ALL_GROUPS_URI
# "/groups/all"
string GET_ALL_GROUP_CONTACTS_URI
# "/groups/contacts/all"
string GET_BALANCE
# "/balance"
string GET_CREDIT
# "/credit"
string GET_MESSAGE_REPORT
# "/query"
smsjuice-API-PHP-wrapper API documentation generated by ApiGen