Package: bufferapp
bufferapp==========================Simple to use python library for Buffer App[![Build Status](https://travis-ci.org/vtemian/buffpy.png?branch=master)](https://travis-ci.org/vtemian/buffpy) [![Coverage Status](https://coveralls.io/repos/vtemian/buffpy/badge.png?branch=master)](https://coveralls.io/r/vtemian/buffpy?branch=master)[![Downloads](https://pypip.in/d/buffpy/badge.png)](https://crate.io/packages/buffpy/)### ORM`ish------------Bufferapp.com details some useful entities:* user* profile* update* link* infoEvery entity can be seen as an object that has attributes and methods. Thosemethdos and attributes are linked to certain endpoints.All objects are special dicts. For example, you can do something like:```pythonuser.id     => '12455678976asd'user        => {...}```If you want to see more complete examples, click [here](../master/examples)#### Authorization------------------Get access_token using buffer [docs](https://bufferapp.com/developers/api/oauth)```pythonservice = AuthService(client_id, client_secret, redirect_uri)url = service.authorize_url# Access the url and retrieve the tokenauth_code = #Paste the code from the redirected urlaccess_token = service.get_access_token(auth_code)api = service.create_session(access_token)```#### User----------A user represents a single Buffer user account.```pythonapi = API(client_id='client_id',client_secret='client_secret',access_token='access_token')# instantiate an user objectuser = User(api=api)print userprint user.idprint user.timezone```#### Profile------------A Buffer profile represents a connection to a single social media account.```pythonprofiles = Profiles(api=api)print profiles.all() # get all profiles# filter profiles using some criteriaprofile = Profiles(api=api).filter(service='twitter')[0]print profile # my twitter profile# get schedules of my twitter profileprint profile.schedules# update schedules times for my twitter profileprofile.schedules = {'days': ['tue', 'thu'],'times': ['13:45']}```#### Update-----------An update represents a single post to a single social media account.```python# retrieve a single update based on an idupdate = Update(api=api, id='51de8d33e48c051712000019')print update# get update's interactionsprint update.interactions# editupdate = update.edit(text="Hey!")# publish nowupdate.publish()# move to topupdate.move_to_top()# deleteupdate.delete()```#### Updates and profiles-------------------------```python# get all pending updates of a social network profileprofile = Profiles(api=api).filter(service='twitter')[0]print profile.updates.pending# get all sent updates of a social network profileprint profile.updates.sent# retrieve all update's interactionsprint profile.updates.sent[0].interactions# shuffle updatesprint profile.updates.shuffle(count=10)# reorder updatesprint profile.updates.reorder(['51dd27629f7fdf520d00009a'])# create an updateprint profile.updates.new("Hello there", now=True)```#### Links----------A link represents a unique URL that has been shared through Buffer```python# get a link's sharesprint Link(api=api, url='http%3A%2F%2Fbufferapp.com').shares```#### Info---------Returns an object with the current configuration that Buffer is using,including supported services, their icons and the varying limits of characterand schedules.```python# instantiate the api objectapi = API(client_id='client_id',client_secret='client_secret',access_token='access_token')# get api's infoprint api.info```