Skip to content

TheCodeDeli/stagebloc-ruby

Repository files navigation

StageBloc - Ruby API Wrapper

The StageBloc gem is an API wrapper to push/receive data for an authenticated user.

Build Status Coverage Status Code Climate

For authentication via OAuth check out our OmniAuth Strategy for Stagebloc.

Installation

Add this line to your application's Gemfile:

gem 'stagebloc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install stagebloc

Configure

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

Usage

The StageBloc wrapper is designed to work like ActiveRecord.

user = StageBloc::User.find(123)
user.name #=> "Test User"

The following endpoints have been created.

Todo

  • replace custom REST adapter with ActiveResource

Contributing

  1. Fork it ( https://github.com/TheCodeDeli/stagebloc-ruby/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Releases

No releases published

Packages

No packages published

Languages