Python client for manage SmsApi account.
Project description
python-client
=============
Klient napisany w języku Python, pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl
EXAMPLES:
```python
from smsapi.client import SmsAPI
from smsapi.responses import ApiError
api = SmsAPI()
# autoryzacyja standardowa
api.set_username('your-username')
api.set_password('your-api-password')
# lub za pomocą tokenu
api.auth_token = 'your-api-token'
try:
api.service('sms').action('send')
api.set_content('Hello [%1%] [%2%]')
api.set_params('name', 'last name')
api.set_to('60xxxxxxx')
api.set_from('Info') #Pole nadawcy lub typ wiadomość 'ECO', '2Way'
result = api.execute()
for r in result:
print(r.id, r.points, r.status)
except ApiError as e:
print('%s - %s' % (e.code, e.message))
```
więcej przykładów znajduje się w katalogu 'examples'
Przykład zmiany adresu serwera na zapasowy:
```python
api = SmsAPI()
api.set_hostname('https://api2.smsapi.pl/') #Zapasowy serwer
```
Ustawienie rodzaju wiadomości na "fast" (wysyłane z priorytetem):
```python
api.set_fast(True)
```
## LICENSE
[Apache 2.0 License](https://github.com/smsapi/smsapi-python-client/blob/master/LICENSE)
## INFO ABOUT DEPRECATED MODULES
Module for phonebook endpoints is deprecated, please use https://github.com/smsapi/smsapi-contacts-python-client
=============
Klient napisany w języku Python, pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl
EXAMPLES:
```python
from smsapi.client import SmsAPI
from smsapi.responses import ApiError
api = SmsAPI()
# autoryzacyja standardowa
api.set_username('your-username')
api.set_password('your-api-password')
# lub za pomocą tokenu
api.auth_token = 'your-api-token'
try:
api.service('sms').action('send')
api.set_content('Hello [%1%] [%2%]')
api.set_params('name', 'last name')
api.set_to('60xxxxxxx')
api.set_from('Info') #Pole nadawcy lub typ wiadomość 'ECO', '2Way'
result = api.execute()
for r in result:
print(r.id, r.points, r.status)
except ApiError as e:
print('%s - %s' % (e.code, e.message))
```
więcej przykładów znajduje się w katalogu 'examples'
Przykład zmiany adresu serwera na zapasowy:
```python
api = SmsAPI()
api.set_hostname('https://api2.smsapi.pl/') #Zapasowy serwer
```
Ustawienie rodzaju wiadomości na "fast" (wysyłane z priorytetem):
```python
api.set_fast(True)
```
## LICENSE
[Apache 2.0 License](https://github.com/smsapi/smsapi-python-client/blob/master/LICENSE)
## INFO ABOUT DEPRECATED MODULES
Module for phonebook endpoints is deprecated, please use https://github.com/smsapi/smsapi-contacts-python-client
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
smsapi-client-1.1.4.tar.gz
(12.4 kB
view hashes)
Built Distribution
Close
Hashes for smsapi_client-1.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a213485c6b9ee5dd18d47f2a808b633466f266a2b515f86e0e412806903885d7 |
|
MD5 | 13d2bfca3901f567ac1058ac0ba0a93e |
|
BLAKE2b-256 | 0fc338583b624ec9e00bc1e92dd3e137de69450ebd1a9c1fab771bd9b81b69e4 |