SMS20API

class SMS20
    Source file(s): SMS20API.py

This class provides access to the SMS2.0 service that allows us to send instant messages to our contacts through an HTTP interface.

SMS 2.0 service gives you the capability to detect presence status of your contacts. You can chat with them via SMS messages when they are offline. If any of your contact is online, he will receive your messages instantly, as with other IMS services (MSN, Yahoo, etc.).

This API allows you to perform the following operations:


You can check billing information here

Methods
Login Performs login to movistar web site
Connect Connects to SMS2.0 service
Polling Performs polling to search for new message notifications, contacts online, etc...
AddContact Adds a contact to the user's contact list
AuthorizeContact Authorizes a contact to be informed about our presence status
DeleteContact Deletes a contact
SendMessage Sends a message to the destination contact
Disconnect Disconnects from SMS2.0 service


class ContactsParser

The ContactsParser class provides the functionality to parse XML to get your contact list

Methods
GetContactList Gets contact list


class PresenceParser

The PresenceParser class provides the functionality to parse XML received with the presence status of your contacts

Methods
GetPresentsList Gets present status list


class MessageParser

The MessageParser class provides the functionality to parse XML with a new message

Methods
GetMessage Gets received message text


class AuthRequestParser

The AuthRequestParser class provides the functionality to find userId and transaction Id of the request from a contact to know your presence status

Methods
GetUser Gets userId and transactionId from a request

Sample Code

SMS 2.0 Sample code to show how to use SMS2.0 service