Modelled after Octokit <3. This is a lightweight client for the Buffer API (https://buffer.com/developers/api), which is intended to return JSON as opposed to objects.
- https://buffer.com/developers/api/oauth
- https://buffer.com/developers/api/user
- https://buffer.com/developers/api/profiles
- https://buffer.com/developers/api/errors
- https://buffer.com/developers/api/updates
- https://buffer.com/developers/api/links
- https://buffer.com/developers/api/info
Put this sucker in your Gemfile and bundle install
gem "buffer-app", :git => "git://github.com/kaneda/buffer-ruby", :ref => "cd461c8a9f934c9a499e7bfe80f93d22e0f6481a"Apologies for the SHA, I'll add a tag shortly
You can define the client up front or configure it later. The options array the BufferClient (and the API objects behind the scenes) uses takes in the following parameters:
- :user_code
- :auth_token
- :logger
buffer_client = BufferClient.new({
:user_code => "yourcode"
})buffer_client = BufferClient.new
buffer_client.configure({
:user_code => "yourcode"
})| Client call | Description | Notes |
|---|---|---|
| get_auth_token | Returns the user's long-lasting auth token | user_code must be defined in the buffer_client, as well as the ENV variables "BUFFER_KEY" and "BUFFER_SECRET" |
| get_user_id | Returns the user's Buffer ID | auth_token must be defined in the buffer client |
| get_user_json | Returns the entirety of the user JSON | auth_token must be defined in the buffer client |
| get_user_profiles | Returns the entirety of the profile JSON | auth_token must be defined in the buffer client |
To contribute simply:
- Fork this project
- Make your changes in a new branch
- Create a PR
- Once approved squash your commits (http://davidwalsh.name/squash-commits-git)
- Party
Email: kanedasan@gmail.com
Twitter: @kanedasan
IRC: kaneda^ on FreeNode (##hackers)