The StageBloc gem is an API wrapper to push/receive data for an authenticated user.
For authentication via OAuth check out our OmniAuth Strategy for Stagebloc.
Add this line to your application's Gemfile:
gem 'stagebloc'
And then execute:
$ bundle
Or install it yourself as:
$ gem install stagebloc
Before using this wrapper you'll need to add your client id
and
client secret
from Stagebloc. You can learn how to obtain these in this
document. https://stagebloc.com/developers/api/v1/general-information
StageBloc.configure do |c|
c.client_id = ENV.fetch('STAGEBLOC_CLIENT_ID')
c.client_secret = ENV.fetch('STAGEBLOC_CLIENT_SECRET')
end
The StageBloc wrapper is designed to work like ActiveRecord.
user = StageBloc::User.find(123)
user.name #=> "Test User"
The following endpoints have been created.
- replace custom REST adapter with ActiveResource
- Fork it ( https://github.com/TheCodeDeli/stagebloc-ruby/fork )
- 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 a new Pull Request