Skip to content

Latest commit

 

History

History
executable file
·
82 lines (56 loc) · 1.74 KB

README.md

File metadata and controls

executable file
·
82 lines (56 loc) · 1.74 KB

Onlinesim Python API

Wrapper for automatic reception of SMS-messages by onlinesim.ru

N|Solid Python publish

Installation

You can install or upgrade package with:

$ pip install onlinesimru --upgrade

Or you can install from source with:

$ git clone https://github.com/s00d/onlinesim-python-api
$ cd onlinesim-python-api
$ python setup.py install

...or install from source buth with pip

$ pip install git+https://github.com/s00d/onlinesim-python-api

Example

from onlinesimru import FreeNumbersService, RentNumbersService, ProxyService, UserService, NumbersService


def main():
    client = UserService('YOUR_TOKEN')
    balance = client.balance()
    print(balance)


main()

Example2

from onlinesimru import FreeNumbersService, RentNumbersService, ProxyService, UserService, NumbersService


def main():
    numbers = NumbersService('YOUR_TOKEN')
    input('Press enter if you sms was sent')

    tzid = numbers.get('service')
    print(tzid)
    code = numbers.wait_code(tzid)
    print(code)


main()

Example3

# multiple driver using
from onlinesimru import Driver


def main():
    driver = Driver('YOUR_TOKEN')

    tzid = driver.numbers().get('service')
    print(tzid)
    code = driver.numbers().wait_code(tzid)
    print(code)


main()

Documentation

All documentation is in the wiki of this project - Documentation

Bugs

If you have any problems, please create Issues here