Project

crowdskout

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby library for interactions with Crowdskout v1 API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.14

Runtime

>= 1.8.1, ~> 1.8
< 4.0, >= 1.25.1
< 4.0, >= 1.6.7
 Project Readme

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