Module bluevia :: Class BlueViaInboundMMS
[hide private]
[frames] | no frames]

Class BlueViaInboundMMS

source code

BlueVia --+
          |
         BlueViaInboundMMS

The BlueVia class for receiving MMS and retrieving MMS attachments.

Instance Methods [hide private]
 
__init__(self, sandbox='_Sandbox', realm='BlueVia', version='v1')
Initialize the BlueViaInboundMMS object
source code
 
receiveMMS(self, shortcode)
Receive all MMS sent to the shortcode with the Keyword defined during BlueVia App generation
source code
 
retrieveAttachments(self, shortcode, messageId)
Retrueve the MMS attachments
source code

Inherited from BlueVia: hasCredentials, loadAccessToken, setAccessToken, setConsumer, setDebug

Inherited from BlueVia (private): _debug, _signAndSend

Class Variables [hide private]

Inherited from BlueVia: access_token, consumer, debugFlag, environment, http, realm, version

Method Details [hide private]

__init__(self, sandbox='_Sandbox', realm='BlueVia', version='v1')
(Constructor)

source code 

Initialize the BlueViaInboundMMS object

Parameters:
  • sandbox - (string): Indicates whether testing should be done in Sandbox mode. Use "" for real network access; Default: "_Sandbox"
  • realm - (string): Realm string; Default: "BlueVia"
  • version - (string): BlueVia API version; Default: "v1"

receiveMMS(self, shortcode)

source code 

Receive all MMS sent to the shortcode with the Keyword defined during BlueVia App generation

This method returns the message ids necessary to retrieve the MMS attachments

Parameters:
  • shortcode - (string): MMS shortcode including country code without "+", e.g. "44"
Returns:
(tuple): (HTTP status, (dict) receivedSMS). HTTP status == "200" for success.

retrieveAttachments(self, shortcode, messageId)

source code 

Retrueve the MMS attachments

Parameters:
  • shortcode - (string): MMS shortcode including country code without "+", e.g. "44"
  • messageId - (string): The message Id recieved by receiveMMS method
Returns:
(tuple): (HTTP status, ((int) count, (string) folder)). HTTP status == "200" for success. Writes <count> decoded files into <folder>