[![Gem Version](https://badge.fury.io/rb/rhymba-api.svg)](https://badge.fury.io/rb/rhymba-api) [![Build Status](https://travis-ci.org/vlgroup/Rhymba-music-api-ruby-gem.svg?branch=master)](https://travis-ci.org/vlgroup/rhymba-ruby-gem)
At VL Group, we specialize in creating unique, integrated digital experiences through the combined powers of music + technology.
VL Group's Rhymba platform is a series of REST-like APIs and endpoints designed to make integrating music downloads, streaming, previews, and artwork into your site or service as easy and efficient as possible. Using OData-based URL structures and returning JSON or XML, Rhymba allows you to search for content, request specific content, deliver it in a variety of ways, and more, in a scalable and lightning-fast manner, regardless of your server-side programming language. You can also query Rhymba using client-side Javascript, from within Flash-based applications, or within mobile applications for usage across a variety of non-traditional applications. Sign up for access here.
We've developed a Ruby wrapper for our Rhymba music API.
Add this line to your application's Gemfile:
gem 'rhymba-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rhymba-api
See more here: http://documentation.vlgroup.com/
require "rhymba"
access_token = ENV["ACCESS_TOKEN"] || (print "ACCESS_TOKEN: "; gets.strip)
access_secret = ENV["ACCESS_SECRET"] || (print "ACCESS_SECRET: "; gets.strip)
client = Rhymba::Client.new access_token: access_token, access_secret: access_secret
puts "Search Media"
@media = client.search_media("$format" => "json","$top" => "4","keyword" => "rick springfield","$select" => "id,title,artist_name,bitrate")
puts "Get Stream Auth Token"
@auth = client.auth_token_content(:method => "GetStream", :ttl => 180, :mediaId => "#{@media["value"][0]["id"]}".to_i, :use_limit => 100, :bitrate => 128, :encoding => "'mp3'", :fadeEnd => 0, :fadeStart => 0, :https => "true",:mono => "false", :protocol => "'http'", :trimEnd => 0, :trimStart => 0)
- Fork it ( http://github.com/vlgroup )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request