nbs 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/lib/nbs.rb +5 -3
- data/lib/nbs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc373bcc737ec2ab1a1f998d9634de3a192493db
|
4
|
+
data.tar.gz: 8a2ed621f77860cbf49abd2f403b25f67d914bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5852df57f8d0c8f990be7c7aae9116885f53b3e12de6844f2eb203dabb232457685ae65717406266719cd30d26c00237ba98c5633a6010af1f57acf0df976f53
|
7
|
+
data.tar.gz: f7e2d4f494a4361e8b36a2c0aae9bc4698d51304ffb004df7d783a6b7df66b10969d6f6af16a2770d710ea7d03c8894724b605a4bf36f93b4bc43ecb3efb51a7
|
data/README.md
CHANGED
@@ -24,13 +24,17 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
Set config variables, at the moment all that is needed is access key:
|
26
26
|
|
27
|
-
Nbs.
|
27
|
+
`Nbs.setup "your_access_key"`
|
28
|
+
|
29
|
+
In a config file eg (rails)
|
30
|
+
|
31
|
+
>config/initializers/nbs.rb
|
28
32
|
|
29
33
|
### Artist search
|
30
34
|
|
31
35
|
Nbs.artist_search("a tribe called quest")
|
32
36
|
|
33
|
-
|
37
|
+
results in
|
34
38
|
```
|
35
39
|
[
|
36
40
|
[0] {
|
@@ -110,7 +114,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
110
114
|
|
111
115
|
## Contributing
|
112
116
|
|
113
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
117
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/eicore/nbs.
|
114
118
|
|
115
119
|
|
116
120
|
## License
|
data/lib/nbs.rb
CHANGED
@@ -7,11 +7,9 @@ class Nbs
|
|
7
7
|
include HTTParty
|
8
8
|
extend Configuration
|
9
9
|
|
10
|
-
define_setting :access_key
|
10
|
+
# define_setting :access_key
|
11
11
|
# define_setting :least_favorite_liquid, "seltzer water"
|
12
12
|
|
13
|
-
base_uri "entintel.api3.nextbigsound.com"
|
14
|
-
|
15
13
|
def initialize(_nbs_id=356, _options = {}) # kanye west
|
16
14
|
@nbs_id = "#{_nbs_id}.json"
|
17
15
|
@options = {from: (Time.now - 2.day).to_i, to: Time.now.to_i}.merge(_options)
|
@@ -51,6 +49,10 @@ class Nbs
|
|
51
49
|
@artist_search
|
52
50
|
end
|
53
51
|
|
52
|
+
def self.setup(_key)
|
53
|
+
base_uri "#{_key}.api3.nextbigsound.com"
|
54
|
+
end
|
55
|
+
|
54
56
|
private
|
55
57
|
|
56
58
|
def tidy_metrics(_arry)
|
data/lib/nbs/version.rb
CHANGED