duxwrap-0.6
توضیحات
Dux-Soup remote control API wrapper
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | duxwrap-0.6 |
| نام | duxwrap |
| نسخه کتابخانه | 0.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | bojan |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/abrihter/duxwrap/releases |
| آدرس اینترنتی | https://pypi.org/project/duxwrap/ |
| مجوز | MIT |
# Dux Soup remote control wrapper
Wrapper around Dux Soup remote control API
## Documentation
[Remote Control by Example](https://support.dux-soup.com/article/115-remote-control-by-example)
[API test environment](https://app.dux-soup.com/web/rc/test)
___
### Commands list
Commands alowed bu Dux Soup remote contol:
- visit (**visit profile**)
- connect (**send connection request**)
- message (**send message**)
- wait (**pause the robot**)
- reset (**clear the queue**)
- size (**size of the queue**)
- profile (**account information**)
- items (**list items in queue**)
___
### Required params for certain commands
#### visit
```
"params": {
"profile": "PROFILE_URL",
}
```
___
#### connect
```
"params": {
"profile": "PROFILE_URL",
"messagetext": "MESSAGE TEXT"
}
```
Please check documentation above for more info on **messagetext** format and additional options
___
#### message
```
"params": {
"messagetext": "MESSAGE TEXT"
}
```
Please check documentation above for more info on **messagetext** format and additional options
___
#### wait
```
"params": {
"duration": DURATION_IN_SECONDS,
}
```
___
### How to use
```python
import json
from duxwrap import DuxWrap
"""create wrapper"""
dux = DuxWrap('API_KEY', 'USER_ID')
print('DuxSoup version:', dux.version)
"""get acount info"""
profile_data = dux.call("profile", {})
print('PROFILE DATA SET')
print(json.dumps(profile_data, indent=4, sort_keys=True))
print('-----------------------------\n\n')
"""pause the robot"""
print('PAUSE RESPONSE')
params = {
"params": {
"duration": 0
}
}
pause_data = dux.call("wait", params)
print(json.dumps(pause_data, indent=4, sort_keys=True))
```
نحوه نصب
نصب پکیج whl duxwrap-0.6:
pip install duxwrap-0.6.whl
نصب پکیج tar.gz duxwrap-0.6:
pip install duxwrap-0.6.tar.gz