0.0
No commit activity in last 3 years
No release in over 3 years
TA ruby gem for accessing the insound.com Web Service API for affiliates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8.4
~> 3.12

Runtime

 Project Readme

insound_api

Gem Version Build Status Code Climate

A ruby gem for accessing the insound.com Web Service API for affiliates.

Install

# Add the following to you Gemfile
gem 'insound_api'

# Update your bundle
bundle install

Setup

You will need to setup insound_api to use your credentials. If you are using rails, a good place to do this is in a initializer:

# /config/initializers/insound_api.rb
InsoundApi.setup do |config|
  config.affiliate_id = 42
  config.api_password = 'my_password'
end

Usage

Currently the API only supports searches and you must provide an artist param. There are some optional params (title, maxresults, format) you can find in their API Doc. The results contain some metadata about the search as well as two arrays of resulting products and artists:

results = InsoundApi.search(:artist => "Nofx", :maxresults => 50)
results.artists_total
 => 1
results.products_total
 => 36
artist = results.artists.first
artist.name
 => "NOFX"
product = results.products.first
product.title
=> "I Heard They Suck Live!"

Products have the following attributes: url, id, title, artist_name, format

and Artists have: url, id, name