Unofficial Adfly API Python Wrapper
- Adf.ly joined Linkvertise as it was announced on their Youtube Video
- Linkvertise, unlike Adf.ly does not provide API endpoint instead has something called Full Script API
- Since Adf.ly is now down and no longer usable, this package and it's source code is invalid and archieved
- You are free fork or use this source code however you want.
To generate keys you should visit here
pip install adfly-api
#Import from adfly import AdflyApi #Initialize api = AdflyApi( user_id=12345678, public_key='xxxxxxxxxx', secret_key='xxxxxxxxxx', ) # Url Groups examples. api.get_groups() # Expand examples. api.expand( ['http://adf.ly/D', 'http://adf.ly/E', 'http://q.gs/4'], [3, '1A', '1C']) api.expand(None, '1F') # Shorten examples. api.shorten([ 'http://docs.python.org/library/json.html', 'https://github.com/benosteen'], ) api.shorten('http://docs.python.org/library/json.html') # Urls examples. api.get_urls() api.get_urls(search_str='htmlbook') api.update_url(136, advert_type='int', group_id=None) api.update_url(136, title='一些中国', fb_description='fb о+писан и+е', fb_image='123') api.delete_url(136)Originally developed by Ben O'Steen