smsapi / smsapi-python-client

SMSAPI Python client that allows you to send messages, manage Short URLs and administrate your SMSAPI account.
https://www.smsapi.com/
Other
55 stars 34 forks source link

add abstraction for HLR service #2

Closed OscaTutenchamon closed 9 years ago

OscaTutenchamon commented 10 years ago

Adds API for HLR service.

I didn't quite knew if you require some checks to be performed on input in *Action class' methods.

api = SmsAPI()

api.set_username('USERNAME')
api.set_password('PASSWORD')

try:
    api.service('hlr').action('check')
    api.set_numbers('NUM1', 'NUM2')

    result = api.execute()
    for r in result:
        print r.status, r.price, r.number, r.id

except ApiError, e:
    print '%s - %s' % (e.code, e.message)
neutrinus commented 10 years ago

Works for me, we use it on production :)

in-void commented 9 years ago

We dont require any checks on input before request, its an old and probably bad idea. Thx for pull its work fine for me ;)