Welcome to pytugboat’s documentation!

Before you can get started with the API you will need an API token. If you are a publisher you can get one by emailing api@tugboatyards.com.

Example usage:

>>> import pprint
>>> from tugboatyards import Tugboat
>>> t = Tugboat("XXXXXXX%YYYYYYYYYYYYY")
>>> pprint.pprint(t.GetPage().__dict__)
{'offers': [<tugboatyards.Offer object at 0x108bb9ed0>,
            <tugboatyards.Offer object at 0x1088c8b50>,
            <tugboatyards.Offer object at 0x108e18a50>],
 'page_id': 212385}
>>> pprint.pprint(t.GetPage().offers[0].__dict__)
{
    'amount': u'10.00',
    'desc': u'This offer will make you an official supporter!',
    'is_recurring': False,
    'offer_id': 301238,
    'offer_name': u'givesupport',
    'offer_type': None,
    'page_id': 212385,
    'status': u'active',
    'title': u'Give Support',
    'user_id': 312481
}

Indices and tables