nbs 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -3
  3. data/lib/nbs.rb +5 -3
  4. data/lib/nbs/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3472ce3ad1a172c5eb9b4ce9fe3b02b2a715bbd4
4
- data.tar.gz: 661096db410d6abf23099ad26329e00c76ff81d3
3
+ metadata.gz: cc373bcc737ec2ab1a1f998d9634de3a192493db
4
+ data.tar.gz: 8a2ed621f77860cbf49abd2f403b25f67d914bae
5
5
  SHA512:
6
- metadata.gz: 0dd24d6c5d7c431fa35bdce8851eaaea1691367d5d337facfb1dabc653a3ac41a2b1bc25b6e02681c75f134bcd09718dd1aeac5934df1430abb8ab44ab531b30
7
- data.tar.gz: 47d77cf5e24e20e0c5e5409fc797d1ab6c9397e80cb1f286b7cee0b3dcf1d8cd04ca1aa879e76d3b5e89061cbbb355657db6979cecc76946ffc1beb1a028cff9
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.access_key = "your_access_key"
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
- returns
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/[USERNAME]/nbs.
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)
@@ -1,3 +1,3 @@
1
1
  class Nbs
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Georgiou