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 +27 -0
- data/Rakefile +1 -1
- data/lib/next-big-sound-lite.rb +1 -2
- data/next-big-sound-lite.gemspec +1 -1
- metadata +2 -2
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.
|
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"
|
data/lib/next-big-sound-lite.rb
CHANGED
data/next-big-sound-lite.gemspec
CHANGED