Skip to content

tumblr/collins_client

Repository files navigation

Collins::Client

The collins_client gem provides a library for API access to Collins.

Installation

First install rvm

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
$ source ~/.bash_profile
$ rvm requirements
$ rvm install 1.9.3
$ rvm use 1.9.3

Install the collins gem and use it

$ gem install collins_client

Remember, if you don't have 1.9.3 set as the default, before you use collins you'll need to do rvm use 1.9.3.

Usage

#!/usr/bin/env ruby
require 'collins_client'
config = {:username => "foo", :password => "bar", :host => "http://127.0.0.1:8080"}
client = Collins::Client.new config
client.find :HOSTNAME => /^abc.*/

Note for developers

If you are implementing support for a new API endpoint, and that endpoint requires an asset tag, please observe the standard of having the method parameter be named asset_or_tag. For instance do:

def new_method asset_or_tag
  # some work
end

and not

def new_method an_asset
  # some work
end

The AssetClient class depends on this naming convention to know how to appropriately proxy method calls to the collins client instance.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages