Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.8 KB

File metadata and controls

64 lines (46 loc) · 1.8 KB

Buffer Gem

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.

Client API

What's Imlemented?

What's Missing?

Basic Usage

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"
})

Available Calls

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

Contributing

To contribute simply:

  1. Fork this project
  2. Make your changes in a new branch
  3. Create a PR
  4. Once approved squash your commits (http://davidwalsh.name/squash-commits-git)
  5. Party

Contact

Email: kanedasan@gmail.com

Twitter: @kanedasan

IRC: kaneda^ on FreeNode (##hackers)