Project

actv

0.01
No commit activity in last 3 years
No release in over 3 years
A Ruby wrapper for the Active API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

>= 0
>= 0
>= 0
>= 0
~> 2.14.1
>= 0

Runtime

~> 0.9.1
~> 0.3.0
 Project Readme

Build Status Code Climate

ACTV

A Ruby wrapper for The ACTIVE Network 3.0 API. You can get your v2 search API key at http://developer.active.com

Installation

Add this line to your application's Gemfile:

gem 'actv'

And then execute:

$ bundle

Or install it yourself as:

$ gem install actv

Configuration

Require the gem, then configure the endpoint and your api key:

ACTV.configure do |config|
  config.endpoint = "http://api.amp.active.com"
  config.api_key = "YOUR_API_KEY"
end

Usage Examples

Search for Running

ACTV.search('Running')

Return an Asset with Id of 12345678-9012-3456-7890-123456789012

ACTV.asset('12345678-9012-3456-7890-123456789012')

Search for Swimming Articles

ACTV.articles('Swimming')

Return an Article with Id of 12345678-9012-3456-7890-123456789012

ACTV.article('12345678-9012-3456-7890-123456789012')

Certain methods require authentication. You need to instantiate a Client object with a valid acceess token

@actv = ACTV::Client.new({
    oauth_token: session[:access_token]
})

Get the requested current user

@actv.me

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request