songstats-api 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d8df26fc2d79b94ae28d7c834c6d6d05faf8b48e7eeca5b66fb0c0c3916cab6
4
- data.tar.gz: 0db44faaaea2e1738aaf0bb31a0c498ec840e2d9dca342aecc540807803f28ff
3
+ metadata.gz: 9a6d73f1bc7dae4d2a9f13b8b9a6e79ffc1d7eae7f439bc6cc11b11d83f74a20
4
+ data.tar.gz: a1e58fb1fece05588a000aa3127a76107a361ef889d375b8fe99998683984c46
5
5
  SHA512:
6
- metadata.gz: 23ffaa30f77ef53d95556ce21a7f702f1c225c7d91b9a1dd217d2956b6a9efcf387bde7550ec3ba263605820c04c8081be63421686f36edd6176c367465cc9eb
7
- data.tar.gz: 6613a579154f5b7e718909a0f417884619cd159dd6073644960056bcf0c522f89e31c45fed0c51a5c4c53f9b9604af344041868c7ee5b583b60a260c1c7fd83d
6
+ metadata.gz: 8ce059265973ec4d7f7d2e9f0848a3f2495a6e9285012d8328df0daee47741ef5d1a9e49ab73c592cb4cc8056ae19900d4fd658f3f9eede8afe4b471eb58d42c
7
+ data.tar.gz: 687bf1a1f80075abd4b1f23425160d6ec42530a56c3504c8af09bebc5ba04c918969b52180e2dfb215f77532a4640ef5120e161afed27fcbd3a1a09d20f1c637
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- songstats-api (1.1.0)
4
+ songstats-api (1.2.0)
5
5
  httparty
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -24,7 +24,24 @@ Or install it yourself as:
24
24
 
25
25
  ## Usage
26
26
 
27
- TODO: Write usage instructions here
27
+ To use this gem ensure that `SONGSTATS_API_KEY` is set as an env variarble.
28
+
29
+ This is a wrapper around Song Stats API - [you can find their docs here](https://docs.songstats.com/docs/api/e80265bb8b01b-songstats-api).
30
+
31
+
32
+ ### Artist
33
+ ```ruby
34
+ artist = Songstats::Api::Artist.new
35
+ artist.search "elton john", {"limit": "1"}
36
+ artist.info "22wbnEMDvgVIAGdFeek6ET"
37
+ ```
38
+
39
+ ### Track
40
+ ```ruby
41
+ track = Songstats::Api::Track.new
42
+ track.search "rocket man", {"limit": "1"}
43
+ track.info "12341234"
44
+ ```
28
45
 
29
46
  ## Development
30
47
 
@@ -1,13 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "singleton"
4
-
5
3
  module Songstats
6
4
  module Api
7
5
  # Artist class for the Songstats API
8
6
  class Artist < Base
9
- include Singleton
10
-
11
7
  def initialize
12
8
  super
13
9
  @type = "artist"
@@ -4,8 +4,6 @@ module Songstats
4
4
  module Api
5
5
  # Label class for the Songstats API
6
6
  class Label < Base
7
- include Singleton
8
-
9
7
  # override because the label id is either songstats_label_id or beatport_label_id
10
8
  def query_string(id)
11
9
  return "songstats_label_id=#{id}" if id.size == SONG_STATS_ID_LENGTH
@@ -4,8 +4,6 @@ module Songstats
4
4
  module Api
5
5
  # Track class for the Songstats API
6
6
  class Track < Base
7
- include Singleton
8
-
9
7
  def initialize
10
8
  super
11
9
  @type = "track"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Songstats
4
4
  module Api
5
- VERSION = "1.1.0"
5
+ VERSION = "1.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: songstats-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daryl Findlay