next-big-sound-lite 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -0,0 +1,27 @@
1
+ == Next Big Sound Lite
2
+
3
+ This gem wraps the next big sound JSON api. Read the API docs {here}[http://api.nextbigsound.com].
4
+
5
+ Done? Then you can use this API.
6
+
7
+ First setup the gem to use your API key:
8
+
9
+ NBS::KEY = 'your_key'
10
+
11
+ The methods of this wrapper are organized in the same way as the subsections of the API docs. For example to call the resource 'view' on Artists you should call:
12
+
13
+ NBS::Artist.view(id)
14
+
15
+ Notice that the receiver has a singular name (ala Rails Models)
16
+
17
+ Another example:
18
+
19
+ NBS::Metric.profile(id)
20
+
21
+ Would call the Profile resource defined under the Metrics subsection. And so on.
22
+
23
+ The one gotcha is the rank resource on the Artists subsection. It expects a type and an array of ids. E.g.
24
+
25
+ NBS::Artist.rank(type, [365, 654, 123])
26
+
27
+ All methods return parsed an array or a hash. No effort is made at this point to create objects out of the raw data. This is where 'lite' comes from :)
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('next-big-sound-lite', '0.1.0') do |p|
6
+ Echoe.new('next-big-sound-lite', '0.1.1') do |p|
7
7
  p.description = "Thin wrapper for the Next Big Sound API."
8
8
  p.url = "http://github.com/rpbertp13/next-big-sound-lite"
9
9
  p.author = "Roberto Thais"
@@ -3,8 +3,7 @@ require 'rest_client'
3
3
  #for version 2.0 of the NBS API
4
4
  module NBS
5
5
 
6
- KEY = "key"
7
- BASE = RestClient::Resource.new("http://#{KEY}.api2.nextbigsound.com")
6
+ BASE = RestClient::Resource.new("http://#{KEY || 'key'}.api2.nextbigsound.com")
8
7
 
9
8
  class Artist
10
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{next-big-sound-lite}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Roberto Thais"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Roberto Thais