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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +18 -1
- data/lib/songstats/api/artist.rb +0 -4
- data/lib/songstats/api/label.rb +0 -2
- data/lib/songstats/api/track.rb +0 -2
- data/lib/songstats/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a6d73f1bc7dae4d2a9f13b8b9a6e79ffc1d7eae7f439bc6cc11b11d83f74a20
|
4
|
+
data.tar.gz: a1e58fb1fece05588a000aa3127a76107a361ef889d375b8fe99998683984c46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ce059265973ec4d7f7d2e9f0848a3f2495a6e9285012d8328df0daee47741ef5d1a9e49ab73c592cb4cc8056ae19900d4fd658f3f9eede8afe4b471eb58d42c
|
7
|
+
data.tar.gz: 687bf1a1f80075abd4b1f23425160d6ec42530a56c3504c8af09bebc5ba04c918969b52180e2dfb215f77532a4640ef5120e161afed27fcbd3a1a09d20f1c637
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -24,7 +24,24 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
27
|
-
|
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
|
|
data/lib/songstats/api/artist.rb
CHANGED
data/lib/songstats/api/label.rb
CHANGED
@@ -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
|
data/lib/songstats/api/track.rb
CHANGED