Skip to content

revvco/crowdskout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crowdskout

Build Status Gem Version Code Climate

A Ruby wrapper for the Crowdskout API.

Crowdskout API documentation can be found here

Installation

Add this line to your application's Gemfile:

gem 'crowdskout'

And then execute:

$ bundle

Or install it yourself as:

$ gem install crowdskout

Usage

Example for OAuth provider:

require 'crowdskout'

oauth_provider = Crowdskout::Auth::OAuth2.new(
    :api_key => client_id,
    :api_secret => client_secret,
    :redirect_url => redirect_uri
  ) 

url = oauth_provider.get_authorization_url("a_state_param")

# after post to URL and granting access
access_token = oauth_provider.get_access_token(params[:code])

Example for Crowdskout API:

require 'crowdskout'

api = Crowdskout::Api.new(api_key, access_token)

# Fetching profiles
profile = api.get_profile(164)

# Fetching field options
field_options = api.get_options_for_a_field("AddressCity")

# Fetching attributes
attributes = api.get_attributes

Releases

No releases published

Packages

No packages published

Languages