{ "info": { "author": "Mardix, Vlad Temian", "author_email": "mardix@pylot.io, vladtemian@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7" ], "description": "bufferapp\n==========================\nSimple to use python library for Buffer App\n\n[![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)\n[![Downloads](https://pypip.in/d/buffpy/badge.png)](https://crate.io/packages/buffpy/)\n\n### ORM`ish\n------------\nBufferapp.com details some useful entities:\n * user\n * profile\n * update\n * link\n * info\n\nEvery entity can be seen as an object that has attributes and methods. Those\nmethdos and attributes are linked to certain endpoints.\n\nAll objects are special dicts. For example, you can do something like:\n```python\nuser.id => '12455678976asd'\nuser => {...}\n```\n\nIf you want to see more complete examples, click [here](../master/examples)\n\n#### Authorization\n------------------\nGet access_token using buffer [docs](https://bufferapp.com/developers/api/oauth)\n\n```python\n\nservice = AuthService(client_id, client_secret, redirect_uri)\n\nurl = service.authorize_url\n\n# Access the url and retrieve the token\nauth_code = #Paste the code from the redirected url\n\naccess_token = service.get_access_token(auth_code)\n\napi = service.create_session(access_token)\n```\n\n#### User\n----------\nA user represents a single Buffer user account.\n\n```python\n\napi = API(client_id='client_id',\n client_secret='client_secret',\n access_token='access_token')\n\n# instantiate an user object\nuser = User(api=api)\n\nprint user\nprint user.id\nprint user.timezone\n```\n\n#### Profile\n------------\nA Buffer profile represents a connection to a single social media account.\n\n```python\nprofiles = Profiles(api=api)\nprint profiles.all() # get all profiles\n\n# filter profiles using some criteria\nprofile = Profiles(api=api).filter(service='twitter')[0]\nprint profile # my twitter profile\n\n# get schedules of my twitter profile\nprint profile.schedules\n\n# update schedules times for my twitter profile\nprofile.schedules = {\n 'days': ['tue', 'thu'],\n 'times': ['13:45']\n}\n```\n\n#### Update\n-----------\nAn update represents a single post to a single social media account.\n\n```python\n# retrieve a single update based on an id\nupdate = Update(api=api, id='51de8d33e48c051712000019')\nprint update\n\n# get update's interactions\nprint update.interactions\n\n# edit\nupdate = update.edit(text=\"Hey!\")\n\n# publish now\nupdate.publish()\n\n# move to top\nupdate.move_to_top()\n\n# delete\nupdate.delete()\n```\n\n#### Updates and profiles\n-------------------------\n\n```python\n# get all pending updates of a social network profile\nprofile = Profiles(api=api).filter(service='twitter')[0]\nprint profile.updates.pending\n\n# get all sent updates of a social network profile\nprint profile.updates.sent\n\n# retrieve all update's interactions\nprint profile.updates.sent[0].interactions\n\n# shuffle updates\nprint profile.updates.shuffle(count=10)\n\n# reorder updates\nprint profile.updates.reorder(['51dd27629f7fdf520d00009a'])\n\n# create an update\nprint profile.updates.new(\"Hello there\", now=True)\n```\n\n#### Links\n----------\nA link represents a unique URL that has been shared through Buffer\n\n```python\n# get a link's shares\nprint Link(api=api, url='http%3A%2F%2Fbufferapp.com').shares\n```\n\n#### Info\n---------\nReturns an object with the current configuration that Buffer is using,\nincluding supported services, their icons and the varying limits of character \nand schedules.\n\n```python\n# instantiate the api object\napi = API(client_id='client_id',\n client_secret='client_secret',\n access_token='access_token')\n\n# get api's info\nprint api.info\n```\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mardix/bufferapp", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "bufferapp", "package_url": "https://pypi.org/project/bufferapp/", "platform": "any", "project_url": "https://pypi.org/project/bufferapp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mardix/bufferapp" }, "release_url": "https://pypi.org/project/bufferapp/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Python library for Buffer App", "version": "0.2.0" }, "last_serial": 1811098, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "a47508e92d6ea2c2607065140248b145", "sha256": "55a2eb2754196bb9c77828ce0e2814fb01ab240817367aa5799afe01fa9c061b" }, "downloads": -1, "filename": "bufferapp-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a47508e92d6ea2c2607065140248b145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9645, "upload_time": "2015-11-11T07:58:32", "url": "https://files.pythonhosted.org/packages/19/19/99c53beef3176b51200bfcd37d8db215c9da1c59b469a9371a5b76dabd38/bufferapp-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a47508e92d6ea2c2607065140248b145", "sha256": "55a2eb2754196bb9c77828ce0e2814fb01ab240817367aa5799afe01fa9c061b" }, "downloads": -1, "filename": "bufferapp-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a47508e92d6ea2c2607065140248b145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9645, "upload_time": "2015-11-11T07:58:32", "url": "https://files.pythonhosted.org/packages/19/19/99c53beef3176b51200bfcd37d8db215c9da1c59b469a9371a5b76dabd38/bufferapp-0.2.0.tar.gz" } ] }