-
Notifications
You must be signed in to change notification settings - Fork 17
GetNumbers
Pavel Kuzmin edited this page Aug 5, 2020
·
8 revisions

from onlinesimru import GetNumbersfrom onlinesimru import GetNumbers
import asyncio
async def main():
client = GetNumbers('YOUR_TOKEN')
tariffs = await client.tariffs()
print(tariffs)
get = await client.get('3223')
print(get)
state = await client.state()
print(state)
# or
state = await client.stateOne(tzid)
print(state)
# next message
state = await client.next(tzid)
...
state = await client.state(tzid)
state = await client.close(tzid)
asyncio.get_event_loop().run_until_complete(main())Get new number for service
| Params | Default | Description |
|---|---|---|
| $service | no | https://onlinesim.ru/docs/api/ru#getnum |
| $country | 7 | country |
| $reject | no | exclusion list |
Get service price
| Params | Default | Description |
|---|---|---|
| $country | 7 | country |
| $service | no | https://onlinesim.ru/docs/api/ru#getnum |
Get list number for service
| Params | Default | Description |
|---|---|---|
| $message_to_code | 1 | 1 - show code, 0 - show full message |
| $orderby | ASC | ASC or DESC |
| $msg_list | true | true - show all message, false show one message< need next method |
| $clean | true | if use msg_list===0 - false - display messages in a circle |
Get selected number for service
| Params | Default | Description |
|---|---|---|
| $message_to_code | 1 | 1 - show code, 0 - show full message |
| $orderby | ASC | ASC or DESC |
| $msg_list | true | true - show all message, false show one message< need next method |
| $clean | true | if use msg_list===0 - false - display messages in a circle |
select next message
| Params | Default | Description |
|---|---|---|
| $tzid | no | operation id |
Close selected number for service
| Params | Default | Description |
|---|---|---|
| $tzid | no | operation id |
List tariffs for number for service
© 2013 - 2020. OnlineSim LLC