Skip to content

GetRent

Pavel Kuzmin edited this page Aug 5, 2020 · 6 revisions

[<< go back]

Diagram

Diagram

from onlinesimru import GetRent

Example

from onlinesimru import GetRent
import asyncio

async def main():
    client = GetRent('YOUR_TOKEN')
    tariffs = await client.tariffs()
    print(tariffs)

    get = await client.get()
    print(get)

    state = await client.state()
    print(state)
    # or 
    state = await client.stateOne(tzid)
    print(state)
    ...
    close = await client.close(tzid)
    close(state)

asyncio.get_event_loop().run_until_complete(main())

Get new rent number

Params Default Description
$country 7 country
$days 1 count rent days
$extension false. auto extension

state [docs ru] [docs en]

Get numbers list


stateOne [docs ru] [docs en]

Get selected number

Params Default Description
$tzid no oreration tzid

extend [docs ru] [docs en]

Extend user number

Params Default Description
$tzid no operation tzid
$days 1 days count

portReload [docs ru] [docs en]

Reload selected port

Params Default Description
$tzid no operation tzid

tariffs [docs ru] [docs en]

Rent tariffs


close [docs ru] [docs en]

Close selected number

Params Default Description
$tzid no operation tzid
Clone this wiki locally