buffer
buffer is a Buffer API Wrapper written in Ruby. It provides more thorough API coverage than the existing gem.
Since the gem is currently in ALPHA development, the interface is prone to change. Please wait until v0.1.0 is released to become reliant on interface. As it stands, all of the basic API calls in BufferApp's spec are available. Some of the optional params are yet to be implemented.
Installation
For now please git clone git@github.com:bufferapp/buffer-ruby.git
the repo
Or
Add this line to your application's Gemfile to include HEAD code:
gem 'buffer', :github => 'bufferapp/buffer-ruby'
And then execute:
$ bundle
Or install RubyGems version, which will receive more attention to stability:
$ gem install buffer
Usage
- All methods are tested with Rspec and WebMock. Most methods do not have integration tests that reach out to the live Buffer API servers. Proceed with caution until buffer reaches v0.1.0 and submit issues on Github Issues tab.
- Authentication is not included in this gem (Try OAuth-buffer2) or use the single API key given when registering your own Buffer Dev credentials.
- Commandline bin is provided to enable posting of updates:
buffer Super witty stuff that fits in 140 chars
Will post to your first account when setup following instructions below. A more convenient setup is planned in future releases. - For convenience load credentials into environment as ENV variables:
export BUFFER_ACCESS_TOKEN="1/jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj" # (BufferApp OAuth Access Token)
export BUFFER_PROFILE_ID="0" # (default of 0)
Access Token Instructions
How to Get Started:
- Create a Developer API Token here: http://bufferapp.com/developers/apps/create.
- Fill in Stuff. Your answers don't matter much for the purpose of this rudimentary setup.
- Submit that form and wait a short period (~2 min )
- Visit: http://bufferapp.com/developers/apps
- Gather Access Token and place it after the word "access_token"
- Set BUFFER_PROFILE_ID="0" if you only have one account to post to. Otherwise it's more complicated ;). Find me on Twitter and I can explain @_ZPH.
TODO:
- Improve instructions
Future versions will integrate with Buffer-OAuth system.
- Integrate Launchy for the purpose of launching browser window.
- Possible to model behavior on t.gem
Raise error if message is beyond the character limit.
- Accomplish this via Twitter Text library
- Refactor to simplify use of default params
API Coverage
Implemented
- User
- Profiles (:get, :post)
- Updates (:get, :post)
- Links
- Info
- Error Codes
Further Details API Coverage
Not Implemented
- Caching
Supported Ruby Implementations
- MRI 2.0.0
- Others likely work but are not included in CI Server
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Issues, refactoring, and feedback are all welcome.
Also, this project is newcomer friendly!! We'd love to be your first Open Source Software contribution and would be happy to assist in that process.
Crafted with care by Zander. Reach out and say hi at @_ZPH or civet.ws