PHP Class GoogleVoice, Google-Voice-PHP-API

ファイルを表示 Open project: aaronpk/Google-Voice-PHP-API Class Usage Examples

Public Methods

Method Description
__construct ( $login, $pass )
addNote ( $message_id, $note ) Add a note to a message in a Google Voice Inbox or Voicemail.
callNumber ( $number, $from_number, $phone_type = 'mobile' ) Place a call to $number connecting first to $fromNumber.
cancelCall ( $number, $from_number, $phone_type = 'mobile' ) Cancel a call to $number connecting first to $fromNumber.
deleteMessage ( $message_id ) Delete a message or conversation.
dom_dump ( $obj )
getNewSMS ( )
getReadSMS ( ) Get all of the read SMS messages in a Google Voice inbox.
getReadVoicemail ( ) Get all of the unread SMS messages from a Google Voice Voicemail.
getUnreadSMS ( ) Get all of the unread SMS messages in a Google Voice inbox.
getUnreadVoicemail ( ) Get all of the unread SMS messages from a Google Voice Voicemail.
getVoicemailMP3 ( $message_id ) Get MP3 of a Google Voice Voicemail.
markMessageRead ( $message_id ) Mark a message in a Google Voice Inbox or Voicemail as read.
markMessageUnread ( $message_id ) Mark a message in a Google Voice Inbox or Voicemail as unread.
markSMSDeleted ( $msgID )
markSMSRead ( $msgID )
removeNote ( $message_id, $note ) Removes a note from a message in a Google Voice Inbox or Voicemail.
sendSMS ( $number, $message ) Send an SMS to $number containing $message.

Private Methods

Method Description
_logIn ( )
dom_get_input_tags ( $html ) Source from http://www.binarytides.com/php-get-name-and-value-of-all-input-tags-on-a-page-with-domdocument/ Generic function to fetch all input tags (name and value) on a page Useful when writing automatic login bots/scrapers

Method Details

__construct() public method

public __construct ( $login, $pass )

addNote() public method

Add a note to a message in a Google Voice Inbox or Voicemail.
public addNote ( $message_id, $note )
$message_id The id of the message to update.
$note The message to send within the SMS.

callNumber() public method

Place a call to $number connecting first to $fromNumber.
public callNumber ( $number, $from_number, $phone_type = 'mobile' )
$number The 10-digit phone number to call (formatted with parens and hyphens or none).

cancelCall() public method

Cancel a call to $number connecting first to $fromNumber.
public cancelCall ( $number, $from_number, $phone_type = 'mobile' )
$number The 10-digit phone number to call (formatted with parens and hyphens or none).

deleteMessage() public method

Delete a message or conversation.
public deleteMessage ( $message_id )
$message_id The ID of the conversation to delete.

dom_dump() public method

public dom_dump ( $obj )

getNewSMS() public method

public getNewSMS ( )

getReadSMS() public method

Get all of the read SMS messages in a Google Voice inbox.
public getReadSMS ( )

getReadVoicemail() public method

Get all of the unread SMS messages from a Google Voice Voicemail.
public getReadVoicemail ( )

getUnreadSMS() public method

Get all of the unread SMS messages in a Google Voice inbox.
public getUnreadSMS ( )

getUnreadVoicemail() public method

Get all of the unread SMS messages from a Google Voice Voicemail.
public getUnreadVoicemail ( )

getVoicemailMP3() public method

Get MP3 of a Google Voice Voicemail.
public getVoicemailMP3 ( $message_id )

markMessageRead() public method

Mark a message in a Google Voice Inbox or Voicemail as read.
public markMessageRead ( $message_id )
$message_id The id of the message to update.

markMessageUnread() public method

Mark a message in a Google Voice Inbox or Voicemail as unread.
public markMessageUnread ( $message_id )
$message_id The id of the message to update.

markSMSDeleted() public method

public markSMSDeleted ( $msgID )

markSMSRead() public method

public markSMSRead ( $msgID )

removeNote() public method

Removes a note from a message in a Google Voice Inbox or Voicemail.
public removeNote ( $message_id, $note )
$message_id The id of the message to update.

sendSMS() public method

Send an SMS to $number containing $message.
public sendSMS ( $number, $message )
$number The 10-digit phone number to send the message to (formatted with parens and hyphens or none).
$message The message to send within the SMS.