Project

gracenote

0.02
No commit activity in last 3 years
No release in over 3 years
Gracenote web api gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

>= 0
>= 0
>= 0
 Project Readme

Gracenote Build Status

A simple ruby wrapper gem for the Gracenote Music API, which can retrieve Artist, Album and Track metadata with the most common options.

Inspired by pygn project.

Gracenote allows you to look up artists, albums, and tracks in the Gracenote database, and returns a number of metadata fields, including:

Basic metadata like Artist Name, Album Title, Track Title. Descriptors like Genre, Origin, Mood, Tempo. Related content like Album Art, Artist Image, Biographies.

Gracenote 1.2 supports TVShow queries

Installation

Add this line to your application's Gemfile:

gem 'gracenote'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install gracenote

Rubygem

https://rubygems.org/gems/gracenote

Usage

You will need a Gracenote Client ID to use this module. Please visit https://developer.gracenote.com to get yours.

Each installed application also needs to have a User ID, which may be obtained by registering your Client ID with the Gracenote API. To do this, do:

spec = {:clientID => "your_client_id", :clientTag => "your_client_tag"}
obj = Gracenote.new(spec)
obj.registerUser

This registration should be done only once per application to avoid hitting your API quota (i.e. definitely do NOT do this before every query).

Once you have your Client ID and User ID, you can start making queries.

To search for the Kings of Convenience track "Homesick" from the album "Riot On An Empty Street",

p obj.findTrack("Kings Of Convenience", "Riot On An Empty Street", "Homesick", '0').inspect

p obj.findTVShow('saved by the bell').inspect

p obj.fetchTVShow('238078046-4B86F4187EE2D215784CE4266CB83EA9').inspect

p obj.fetchSeason('238050049-B36CFD6F8B6FC76E2174F2A6E22515CD').inspect

p obj.findContributor('vince vaughn').inspect

p obj.fetchContributor('238498181-193BE2BA655E1490A3B8DF3ACCACEF3A').inspect

Contributing

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