Wrapper around the DoYouBuzz showcase API
Ruby
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/doyoubuzz
spec
.coveralls.yml
.gitignore
.rspec
.travis.yml
CHANGELOG.md
Gemfile
LICENSE.txt
README.md
Rakefile
doyoubuzz-showcase.gemspec

README.md

Gem Version Build Status Coverage Status Code Climate

Doyoubuzz::Showcase

Description

The doyoubuzz-showcase gem is a thin ruby wrapper for the DoYouBuzz Showcase API. Based around the HTTParty gem, it handles the authorization and HTTP calls, and wraps the results in a Hashie::Mash for a simpler usage.

Requirements

  • httparty
  • hashie
  • ruby >= 2.1.0

Installation

Add this line to your application's Gemfile:

gem 'doyoubuzz-showcase'

And then execute:

$ bundle

Or install it yourself as:

$ gem install doyoubuzz-showcase

Usage

Authentication

# Authenticate with your API credentials
client = Doyoubuzz::Showcase.new('your_api_key', 'your_api_secret')

Querying

# Getting a results collection
response = client.get '/users'

puts response.users.items.first.email
# $ john.doe@domain.com

Queries with parameters

# Get another page
response = client.get '/users', :page => 2

HTTP Verbs support

# Associate a tag to a user
response = client.put '/users/12345/associateTags', :tags => [12, 13, 14]

Contributing

  1. Fork it
  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 new Pull Request