songstats-ruby-sdk 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e9cfa8f372c183dcde82286fa023415c8fb16b62c7f78652eef43d1128adaca
4
- data.tar.gz: 995c45f1acab79d840ce4a899577ba4a964284f3ceb5ce72b75bb221e120e22e
3
+ metadata.gz: 945c6e1633b17ff53c42b955569c8b455e84d9b56dc59bd4699fdd2c8c3bc258
4
+ data.tar.gz: a10d50ee87692028ced69241cc27c7114052b257de77843a47168e84a62be5d9
5
5
  SHA512:
6
- metadata.gz: bbf2f0293a3b15963723911ee7679c464d4eb96bdd71468ccfd4e3fb3508021b297aa219252f90fcbf24381b2d2892ec2f423ad3bb4f0d3546342debac10dfeb
7
- data.tar.gz: e66e21ea1532cd8e0cc8fe6f350af45cd506df7a267a6c79a1a158338727805beeef8a83a0308dabad043d9185f707b232f8649468319d560be645c401f0a0f3
6
+ metadata.gz: 600020786d908a698420acf2f32de35f52d03f87c25bc8879b2aae8f4dc305f69ee2d0cefeeac49d779bb72f37189fe93d68df7f4f6cd1c02fb590e21cf6773a
7
+ data.tar.gz: 54b1799ecf012f835cb5ef34647a297753d394551cb37e1fc12449ffc2e1fa61cca03e9c90482219610908a89dca9d2fe81b60a791af16ff17d7c1c3effdee70
data/CHANGELOG.md CHANGED
@@ -2,9 +2,23 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.2.1] - 2026-06-14
6
+
7
+ ### Changed
8
+
9
+ - Updated the default Enterprise API host from `data.songstats.com` to `api.songstats.com`.
10
+
11
+ ## [0.2.0] - 2026-02-19
12
+
13
+ ### Changed
14
+
15
+ - Removed `charts` resource client from the SDK surface
16
+ - Removed `stations` resource client from the SDK surface
17
+
5
18
  ## [0.1.0] - 2026-02-19
6
19
 
7
20
  ### Added
21
+
8
22
  - Initial standalone Ruby SDK repo for Songstats Enterprise API (`/enterprise/v1`)
9
23
  - Full resource coverage:
10
24
  - `info`
data/README.md CHANGED
@@ -1,55 +1,115 @@
1
1
  # Songstats Ruby SDK
2
2
 
3
- Official Ruby Client SDK for the Songstats Enterprise API.
3
+ Official Ruby client for the **Songstats Enterprise API**.
4
4
 
5
- ## API Documentation
5
+ 📦 RubyGems: https://rubygems.org/gems/songstats-ruby-sdk
6
+ 📚 API Documentation: https://docs.songstats.com
7
+ 🔑 API Key Access: Please contact api@songstats.com
6
8
 
7
- https://docs.songstats.com
9
+ ---
8
10
 
9
- ## Install
11
+ ## Requirements
10
12
 
11
- ```bash
12
- bundle install
13
- bundle exec rake test
14
- ```
13
+ - Ruby >= 3.0
15
14
 
16
- For local usage in another project:
15
+ ---
17
16
 
18
- ```ruby
19
- gem "songstats-ruby-sdk", path: "/path/to/songstats-ruby-sdk"
20
- ```
17
+ ## Installation
18
+
19
+ Add to your `Gemfile`:
20
+
21
+ gem "songstats-ruby-sdk"
22
+
23
+ Then install:
24
+
25
+ bundle install
26
+
27
+ Or install directly via RubyGems:
28
+
29
+ gem install songstats-ruby-sdk
30
+
31
+ ---
21
32
 
22
33
  ## Quick Start
23
34
 
24
- ```ruby
25
- require "songstats_sdk"
35
+ require "songstats_sdk"
36
+
37
+ client = SongstatsSDK::Client.new(
38
+ api_key: ENV["SONGSTATS_API_KEY"]
39
+ )
40
+
41
+ # API status
42
+ status = client.info.status
26
43
 
27
- client = SongstatsSDK::Client.new(api_key: "YOUR_API_KEY")
44
+ # Track information
45
+ track = client.tracks.info(
46
+ songstats_track_id: "abcd1234"
47
+ )
28
48
 
29
- status = client.info.status
30
- track = client.tracks.info(songstats_track_id: "abcd1234")
31
- artist_stats = client.artists.stats(songstats_artist_id: "abcd1234", source: "spotify")
32
- ```
49
+ # Artist statistics
50
+ artist_stats = client.artists.stats(
51
+ songstats_artist_id: "abcd1234",
52
+ source: "spotify"
53
+ )
54
+
55
+ ---
33
56
 
34
57
  ## Authentication
35
58
 
36
- The SDK sends your key in the `apikey` header, matching Songstats enterprise auth.
59
+ All requests include your API key in the `apikey` header.
60
+
61
+ You can generate an API key in your Songstats Enterprise dashboard.
62
+
63
+ We recommend storing your key securely in environment variables:
37
64
 
38
- ## Included Resource Clients
65
+ export SONGSTATS_API_KEY=your_key_here
66
+
67
+ ---
68
+
69
+ ## Available Resource Clients
39
70
 
40
71
  - `client.info`
41
72
  - `client.tracks`
42
73
  - `client.artists`
43
74
  - `client.collaborators`
44
75
  - `client.labels`
45
- - `client.charts`
46
- - `client.stations`
76
+
77
+ Info endpoints:
78
+ - `client.info.sources` -> `/sources`
79
+ - `client.info.status` -> `/status`
80
+ - `client.info.definitions` -> `/definitions`
81
+
82
+ ---
47
83
 
48
84
  ## Error Handling
49
85
 
50
- - `SongstatsSDK::SongstatsAPIError`: non-2xx HTTP response
51
- - `SongstatsSDK::SongstatsTransportError`: transport/connectivity failure
86
+ begin
87
+ client.tracks.info(songstats_track_id: "invalid")
88
+ rescue SongstatsSDK::SongstatsAPIError => e
89
+ puts "API error: #{e.message}"
90
+ rescue SongstatsSDK::SongstatsTransportError => e
91
+ puts "Transport error: #{e.message}"
92
+ end
93
+
94
+ ---
95
+
96
+ ## Development
97
+
98
+ To work on the SDK locally:
99
+
100
+ git clone https://github.com/songstats/songstats-ruby-sdk.git
101
+ cd songstats-ruby-sdk
102
+ bundle install
103
+ bundle exec rake test
104
+
105
+ ---
106
+
107
+ ## Versioning
108
+
109
+ This SDK follows Semantic Versioning (SemVer).
110
+
111
+ ---
52
112
 
53
- ## Route Coverage Audit
113
+ ## License
54
114
 
55
- See `docs/enterprise_routes_audit.md` for the Rails route to SDK method mapping.
115
+ MIT
@@ -1,6 +1,7 @@
1
1
  # Enterprise Routes Audit (Songstats Rails -> Ruby SDK)
2
2
 
3
3
  Audited against:
4
+
4
5
  - `/Users/Oskar/1001tl/config/routes.rb`
5
6
  - `/Users/Oskar/1001tl/app/controllers/enterprise/v1/*.rb`
6
7
  - `/Users/Oskar/1001tl/app/helpers/enterprise_helper.rb`
@@ -9,110 +10,98 @@ Authentication observed in Rails: `apikey` request header.
9
10
 
10
11
  ## `/enterprise/v1/info`
11
12
 
12
- | HTTP | Route | SDK Method |
13
- |---|---|---|
14
- | GET | `/sources` | `client.info.sources` |
15
- | GET | `/status` | `client.info.status` |
16
- | GET | `/uptime_check` | `client.info.uptime_check` |
17
- | GET | `/definitions` | `client.info.definitions` |
13
+ | HTTP | Route | SDK Method |
14
+ | ---- | --------------- | -------------------------- |
15
+ | GET | `/sources` | `client.info.sources` |
16
+ | GET | `/status` | `client.info.status` |
17
+ | GET | `/uptime_check` | `client.info.uptime_check` |
18
+ | GET | `/definitions` | `client.info.definitions` |
18
19
 
19
20
  ## `/enterprise/v1/tracks`
20
21
 
21
- | HTTP | Route | SDK Method |
22
- |---|---|---|
23
- | GET | `/info` | `client.tracks.info(...)` |
24
- | GET | `/stats` | `client.tracks.stats(...)` |
25
- | GET | `/historic_stats` | `client.tracks.historic_stats(...)` |
26
- | GET | `/search` | `client.tracks.search(q: ..., ...)` |
27
- | GET | `/activities` | `client.tracks.activities(...)` |
28
- | GET | `/comments` | `client.tracks.comments(...)` |
29
- | GET | `/songshare` | `client.tracks.songshare(...)` |
30
- | GET | `/locations` | `client.tracks.locations(...)` |
31
- | POST | `/link_request` | `client.tracks.add_link_request(link: ..., ...)` |
32
- | DELETE | `/link_request` | `client.tracks.remove_link_request(link: ..., ...)` |
33
- | POST | `/add_to_member_relevant_list` | `client.tracks.add_to_member_relevant_list(...)` |
22
+ | HTTP | Route | SDK Method |
23
+ | ------ | ----------------------------------- | ----------------------------------------------------- |
24
+ | GET | `/info` | `client.tracks.info(...)` |
25
+ | GET | `/stats` | `client.tracks.stats(...)` |
26
+ | GET | `/historic_stats` | `client.tracks.historic_stats(...)` |
27
+ | GET | `/search` | `client.tracks.search(q: ..., ...)` |
28
+ | GET | `/activities` | `client.tracks.activities(...)` |
29
+ | GET | `/comments` | `client.tracks.comments(...)` |
30
+ | GET | `/songshare` | `client.tracks.songshare(...)` |
31
+ | GET | `/locations` | `client.tracks.locations(...)` |
32
+ | POST | `/link_request` | `client.tracks.add_link_request(link: ..., ...)` |
33
+ | DELETE | `/link_request` | `client.tracks.remove_link_request(link: ..., ...)` |
34
+ | POST | `/add_to_member_relevant_list` | `client.tracks.add_to_member_relevant_list(...)` |
34
35
  | DELETE | `/remove_from_member_relevant_list` | `client.tracks.remove_from_member_relevant_list(...)` |
35
36
 
36
- ## `/enterprise/v1/charts`
37
-
38
- | HTTP | Route | SDK Method |
39
- |---|---|---|
40
- | GET | `/tracks` | `client.charts.tracks(country_code: ..., ...)` |
41
-
42
- ## `/enterprise/v1/stations`
43
-
44
- | HTTP | Route | SDK Method |
45
- |---|---|---|
46
- | POST | `/station_request` | `client.stations.station_request(...)` |
47
-
48
37
  ## `/enterprise/v1/artists`
49
38
 
50
- | HTTP | Route | SDK Method |
51
- |---|---|---|
52
- | GET | `/info` | `client.artists.info(...)` |
53
- | GET | `/stats` | `client.artists.stats(...)` |
54
- | GET | `/historic_stats` | `client.artists.historic_stats(...)` |
55
- | GET | `/audience` | `client.artists.audience(...)` |
56
- | GET | `/audience/details` | `client.artists.audience_details(country_code: ..., ...)` |
57
- | GET | `/catalog` | `client.artists.catalog(...)` |
58
- | GET | `/search` | `client.artists.search(q: ..., ...)` |
59
- | GET | `/activities` | `client.artists.activities(...)` |
60
- | GET | `/songshare` | `client.artists.songshare(...)` |
61
- | GET | `/top_tracks` | `client.artists.top_tracks(...)` |
62
- | GET | `/top_playlists` | `client.artists.top_playlists(...)` |
63
- | GET | `/top_curators` | `client.artists.top_curators(...)` |
64
- | GET | `/top_commentors` | `client.artists.top_commentors(...)` |
65
- | POST | `/link_request` | `client.artists.add_link_request(link: ..., ...)` |
66
- | DELETE | `/link_request` | `client.artists.remove_link_request(link: ..., ...)` |
67
- | POST | `/track_request` | `client.artists.add_track_request(...)` |
68
- | DELETE | `/track_request` | `client.artists.remove_track_request(...)` |
69
- | POST | `/add_to_member_relevant_list` | `client.artists.add_to_member_relevant_list(...)` |
70
- | DELETE | `/remove_from_member_relevant_list` | `client.artists.remove_from_member_relevant_list(...)` |
39
+ | HTTP | Route | SDK Method |
40
+ | ------ | ----------------------------------- | --------------------------------------------------------- |
41
+ | GET | `/info` | `client.artists.info(...)` |
42
+ | GET | `/stats` | `client.artists.stats(...)` |
43
+ | GET | `/historic_stats` | `client.artists.historic_stats(...)` |
44
+ | GET | `/audience` | `client.artists.audience(...)` |
45
+ | GET | `/audience/details` | `client.artists.audience_details(country_code: ..., ...)` |
46
+ | GET | `/catalog` | `client.artists.catalog(...)` |
47
+ | GET | `/search` | `client.artists.search(q: ..., ...)` |
48
+ | GET | `/activities` | `client.artists.activities(...)` |
49
+ | GET | `/songshare` | `client.artists.songshare(...)` |
50
+ | GET | `/top_tracks` | `client.artists.top_tracks(...)` |
51
+ | GET | `/top_playlists` | `client.artists.top_playlists(...)` |
52
+ | GET | `/top_curators` | `client.artists.top_curators(...)` |
53
+ | GET | `/top_commentors` | `client.artists.top_commentors(...)` |
54
+ | POST | `/link_request` | `client.artists.add_link_request(link: ..., ...)` |
55
+ | DELETE | `/link_request` | `client.artists.remove_link_request(link: ..., ...)` |
56
+ | POST | `/track_request` | `client.artists.add_track_request(...)` |
57
+ | DELETE | `/track_request` | `client.artists.remove_track_request(...)` |
58
+ | POST | `/add_to_member_relevant_list` | `client.artists.add_to_member_relevant_list(...)` |
59
+ | DELETE | `/remove_from_member_relevant_list` | `client.artists.remove_from_member_relevant_list(...)` |
71
60
 
72
61
  ## `/enterprise/v1/collaborators`
73
62
 
74
- | HTTP | Route | SDK Method |
75
- |---|---|---|
76
- | GET | `/info` | `client.collaborators.info(...)` |
77
- | GET | `/stats` | `client.collaborators.stats(...)` |
78
- | GET | `/historic_stats` | `client.collaborators.historic_stats(...)` |
79
- | GET | `/audience` | `client.collaborators.audience(...)` |
80
- | GET | `/audience/details` | `client.collaborators.audience_details(country_code: ..., ...)` |
81
- | GET | `/catalog` | `client.collaborators.catalog(...)` |
82
- | GET | `/search` | `client.collaborators.search(q: ..., ...)` |
83
- | GET | `/activities` | `client.collaborators.activities(...)` |
84
- | GET | `/songshare` | `client.collaborators.songshare(...)` |
85
- | GET | `/top_tracks` | `client.collaborators.top_tracks(...)` |
86
- | GET | `/top_playlists` | `client.collaborators.top_playlists(...)` |
87
- | GET | `/top_curators` | `client.collaborators.top_curators(...)` |
88
- | GET | `/top_commentors` | `client.collaborators.top_commentors(...)` |
89
- | POST | `/link_request` | `client.collaborators.add_link_request(link: ..., ...)` |
90
- | DELETE | `/link_request` | `client.collaborators.remove_link_request(link: ..., ...)` |
91
- | POST | `/track_request` | `client.collaborators.add_track_request(...)` |
92
- | DELETE | `/track_request` | `client.collaborators.remove_track_request(...)` |
93
- | POST | `/add_to_member_relevant_list` | `client.collaborators.add_to_member_relevant_list(...)` |
94
- | DELETE | `/remove_from_member_relevant_list` | `client.collaborators.remove_from_member_relevant_list(...)` |
63
+ | HTTP | Route | SDK Method |
64
+ | ------ | ----------------------------------- | --------------------------------------------------------------- |
65
+ | GET | `/info` | `client.collaborators.info(...)` |
66
+ | GET | `/stats` | `client.collaborators.stats(...)` |
67
+ | GET | `/historic_stats` | `client.collaborators.historic_stats(...)` |
68
+ | GET | `/audience` | `client.collaborators.audience(...)` |
69
+ | GET | `/audience/details` | `client.collaborators.audience_details(country_code: ..., ...)` |
70
+ | GET | `/catalog` | `client.collaborators.catalog(...)` |
71
+ | GET | `/search` | `client.collaborators.search(q: ..., ...)` |
72
+ | GET | `/activities` | `client.collaborators.activities(...)` |
73
+ | GET | `/songshare` | `client.collaborators.songshare(...)` |
74
+ | GET | `/top_tracks` | `client.collaborators.top_tracks(...)` |
75
+ | GET | `/top_playlists` | `client.collaborators.top_playlists(...)` |
76
+ | GET | `/top_curators` | `client.collaborators.top_curators(...)` |
77
+ | GET | `/top_commentors` | `client.collaborators.top_commentors(...)` |
78
+ | POST | `/link_request` | `client.collaborators.add_link_request(link: ..., ...)` |
79
+ | DELETE | `/link_request` | `client.collaborators.remove_link_request(link: ..., ...)` |
80
+ | POST | `/track_request` | `client.collaborators.add_track_request(...)` |
81
+ | DELETE | `/track_request` | `client.collaborators.remove_track_request(...)` |
82
+ | POST | `/add_to_member_relevant_list` | `client.collaborators.add_to_member_relevant_list(...)` |
83
+ | DELETE | `/remove_from_member_relevant_list` | `client.collaborators.remove_from_member_relevant_list(...)` |
95
84
 
96
85
  ## `/enterprise/v1/labels`
97
86
 
98
- | HTTP | Route | SDK Method |
99
- |---|---|---|
100
- | GET | `/info` | `client.labels.info(...)` |
101
- | GET | `/stats` | `client.labels.stats(...)` |
102
- | GET | `/historic_stats` | `client.labels.historic_stats(...)` |
103
- | GET | `/audience` | `client.labels.audience(...)` |
104
- | GET | `/audience/details` | `client.labels.audience_details(country_code: ..., ...)` |
105
- | GET | `/catalog` | `client.labels.catalog(...)` |
106
- | GET | `/search` | `client.labels.search(q: ..., ...)` |
107
- | GET | `/activities` | `client.labels.activities(...)` |
108
- | GET | `/songshare` | `client.labels.songshare(...)` |
109
- | GET | `/top_tracks` | `client.labels.top_tracks(...)` |
110
- | GET | `/top_playlists` | `client.labels.top_playlists(...)` |
111
- | GET | `/top_curators` | `client.labels.top_curators(...)` |
112
- | GET | `/top_commentors` | `client.labels.top_commentors(...)` |
113
- | POST | `/link_request` | `client.labels.add_link_request(link: ..., ...)` |
114
- | DELETE | `/link_request` | `client.labels.remove_link_request(link: ..., ...)` |
115
- | POST | `/track_request` | `client.labels.add_track_request(...)` |
116
- | DELETE | `/track_request` | `client.labels.remove_track_request(...)` |
117
- | POST | `/add_to_member_relevant_list` | `client.labels.add_to_member_relevant_list(...)` |
118
- | DELETE | `/remove_from_member_relevant_list` | `client.labels.remove_from_member_relevant_list(...)` |
87
+ | HTTP | Route | SDK Method |
88
+ | ------ | ----------------------------------- | -------------------------------------------------------- |
89
+ | GET | `/info` | `client.labels.info(...)` |
90
+ | GET | `/stats` | `client.labels.stats(...)` |
91
+ | GET | `/historic_stats` | `client.labels.historic_stats(...)` |
92
+ | GET | `/audience` | `client.labels.audience(...)` |
93
+ | GET | `/audience/details` | `client.labels.audience_details(country_code: ..., ...)` |
94
+ | GET | `/catalog` | `client.labels.catalog(...)` |
95
+ | GET | `/search` | `client.labels.search(q: ..., ...)` |
96
+ | GET | `/activities` | `client.labels.activities(...)` |
97
+ | GET | `/songshare` | `client.labels.songshare(...)` |
98
+ | GET | `/top_tracks` | `client.labels.top_tracks(...)` |
99
+ | GET | `/top_playlists` | `client.labels.top_playlists(...)` |
100
+ | GET | `/top_curators` | `client.labels.top_curators(...)` |
101
+ | GET | `/top_commentors` | `client.labels.top_commentors(...)` |
102
+ | POST | `/link_request` | `client.labels.add_link_request(link: ..., ...)` |
103
+ | DELETE | `/link_request` | `client.labels.remove_link_request(link: ..., ...)` |
104
+ | POST | `/track_request` | `client.labels.add_track_request(...)` |
105
+ | DELETE | `/track_request` | `client.labels.remove_track_request(...)` |
106
+ | POST | `/add_to_member_relevant_list` | `client.labels.add_to_member_relevant_list(...)` |
107
+ | DELETE | `/remove_from_member_relevant_list` | `client.labels.remove_from_member_relevant_list(...)` |
@@ -2,7 +2,7 @@
2
2
 
3
3
  module SongstatsSDK
4
4
  class Client
5
- attr_reader :info, :tracks, :artists, :collaborators, :labels, :charts, :stations
5
+ attr_reader :info, :tracks, :artists, :collaborators, :labels
6
6
 
7
7
  def initialize(api_key:, base_url: HTTPClient::DEFAULT_BASE_URL, timeout: HTTPClient::DEFAULT_TIMEOUT_SECONDS,
8
8
  max_retries: 2, http_adapter: nil, user_agent: nil)
@@ -20,8 +20,6 @@ module SongstatsSDK
20
20
  @artists = Resources::Artists.new(@http)
21
21
  @collaborators = Resources::Collaborators.new(@http)
22
22
  @labels = Resources::Labels.new(@http)
23
- @charts = Resources::Charts.new(@http)
24
- @stations = Resources::Stations.new(@http)
25
23
  end
26
24
 
27
25
  def close
@@ -15,7 +15,7 @@ module SongstatsSDK
15
15
  }.freeze
16
16
 
17
17
  def request(method:, base_url:, path:, headers:, params:, json:, timeout:)
18
- uri = URI.join("#{base_url.chomp('/')}/", path.sub(%r{\A/}, ""))
18
+ uri = URI.join("#{base_url.chomp('/')}/", path.delete_prefix('/'))
19
19
  query = URI.encode_www_form(params || {})
20
20
  uri.query = [uri.query, query].compact.reject(&:empty?).join("&") unless query.empty?
21
21
 
@@ -39,7 +39,7 @@ module SongstatsSDK
39
39
  end
40
40
 
41
41
  class HTTPClient
42
- DEFAULT_BASE_URL = "https://data.songstats.com"
42
+ DEFAULT_BASE_URL = "https://api.songstats.com"
43
43
  DEFAULT_TIMEOUT_SECONDS = 30
44
44
  RETRYABLE_STATUS_CODES = [429, 500, 502, 503, 504].freeze
45
45
  RETRYABLE_EXCEPTIONS = [
@@ -72,7 +72,7 @@ module SongstatsSDK
72
72
  end
73
73
 
74
74
  def request(method, path, params: nil, json: nil)
75
- endpoint = "/enterprise/v1/#{path.to_s.sub(%r{\A/}, "")}"
75
+ endpoint = "/enterprise/v1/#{path.to_s.delete_prefix('/')}"
76
76
  attempts = 0
77
77
 
78
78
  loop do
@@ -22,7 +22,7 @@ module SongstatsSDK
22
22
  end
23
23
 
24
24
  def normalize_params(params)
25
- return nil if params.nil? || params.empty?
25
+ return nil if params.blank?
26
26
 
27
27
  normalized = {}
28
28
  params.each do |key, value|
@@ -4,5 +4,3 @@ require_relative "resources/base"
4
4
  require_relative "resources/info"
5
5
  require_relative "resources/tracks"
6
6
  require_relative "resources/entities"
7
- require_relative "resources/charts"
8
- require_relative "resources/stations"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SongstatsSDK
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: songstats-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Songstats
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-19 00:00:00.000000000 Z
11
+ date: 2026-06-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Typed Ruby client covering all /enterprise/v1 Songstats API routes.
13
+ description: Typed Ruby client for Songstats Enterprise API resources.
14
14
  email:
15
15
  - api@songstats.com
16
16
  executables: []
@@ -27,10 +27,8 @@ files:
27
27
  - lib/songstats_sdk/http_client.rb
28
28
  - lib/songstats_sdk/resources.rb
29
29
  - lib/songstats_sdk/resources/base.rb
30
- - lib/songstats_sdk/resources/charts.rb
31
30
  - lib/songstats_sdk/resources/entities.rb
32
31
  - lib/songstats_sdk/resources/info.rb
33
- - lib/songstats_sdk/resources/stations.rb
34
32
  - lib/songstats_sdk/resources/tracks.rb
35
33
  - lib/songstats_sdk/version.rb
36
34
  homepage: https://songstats.com
@@ -41,6 +39,7 @@ metadata:
41
39
  source_code_uri: https://github.com/songstats/songstats-ruby-sdk
42
40
  bug_tracker_uri: https://github.com/songstats/songstats-ruby-sdk/issues
43
41
  allowed_push_host: https://rubygems.org
42
+ rubygems_mfa_required: 'true'
44
43
  post_install_message:
45
44
  rdoc_options: []
46
45
  require_paths:
@@ -49,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
49
48
  requirements:
50
49
  - - ">="
51
50
  - !ruby/object:Gem::Version
52
- version: 3.0.0
51
+ version: 3.2.0
53
52
  required_rubygems_version: !ruby/object:Gem::Requirement
54
53
  requirements:
55
54
  - - ">="
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SongstatsSDK
4
- module Resources
5
- class Charts < Base
6
- def tracks(country_code:, source: nil, **params)
7
- raise ArgumentError, "country_code is required" if country_code.to_s.empty?
8
-
9
- query = { country_code: country_code, source: source }.merge(params)
10
- get("charts/tracks", params: query)
11
- end
12
- end
13
- end
14
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SongstatsSDK
4
- module Resources
5
- class Stations < Base
6
- def station_request(radio_type:, name:, country_code:, website:, stream_url: nil, city_name: nil, frequency: nil,
7
- contact: nil, comment: nil, **extra)
8
- raise ArgumentError, "radio_type is required" if radio_type.to_s.empty?
9
- raise ArgumentError, "name is required" if name.to_s.empty?
10
- raise ArgumentError, "country_code is required" if country_code.to_s.empty?
11
- raise ArgumentError, "website is required" if website.to_s.empty?
12
-
13
- payload = {
14
- radio_type: radio_type,
15
- name: name,
16
- country_code: country_code,
17
- website: website,
18
- stream_url: stream_url,
19
- city_name: city_name,
20
- frequency: frequency,
21
- contact: contact,
22
- comment: comment
23
- }.merge(extra)
24
-
25
- post("stations/station_request", json: payload)
26
- end
27
- end
28
- end
29
- end