spotifyrb 0.1.0 → 0.1.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: 345ef99e89558b4a5c11c6a836359de78ff54f8db0bcef8bde85a32b1a936ba3
4
- data.tar.gz: 0e679b99c79f66528134becc5cdd6b30c89a0d7e942bf787aedabaf71fcf7e82
3
+ metadata.gz: 9f297da4352a87242f5d72b1cdc14165fb2a1172bfb2c96a7cc0e74973ab3a37
4
+ data.tar.gz: 64536c5db2bc94fc14c515d7c36523590882f6933a059d32cc334737daa2a3f0
5
5
  SHA512:
6
- metadata.gz: c3df60285cca7ec260913ea4fe3f40a5de2902a13b63dabb15e160b9c14b87dcda4f4998884bfc779e1decb14002ae33bdfa7dcd544447dadd9c59025aa9e2bc
7
- data.tar.gz: d8851f465644af778387b5f4bf564e6e798cc156367bfcd8866387ab5f6e4178efc75027c82532e51840fbbcaa034040107cc45ec324fc41b2f29aa595fe9e81
6
+ metadata.gz: 87672f073f278b959edf147ecb7ce0cd7ac2434c290c9f6be6e9a8ccaff8dc449dc2315492d1409b3e53045629aeb443782787fd1a0092f830eaa6c331da45a4
7
+ data.tar.gz: b9cd9a4065b9daccc30e0e44822384c461a911181830f718df640b2dca25cd52b00baef1234797b5fae6114a2e42c512b5944d90a38c1d2d4879333801be9a46
@@ -27,9 +27,9 @@ jobs:
27
27
  fail-fast: false
28
28
  matrix:
29
29
  ruby_version:
30
- - '3.1'
31
30
  - '3.2'
32
31
  - '3.3'
32
+ - '3.4'
33
33
  steps:
34
34
  - uses: actions/checkout@v4
35
35
  - uses: ruby/setup-ruby@v1
data/Gemfile.lock CHANGED
@@ -1,112 +1,117 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spotifyrb (0.1.0)
4
+ spotifyrb (0.1.1)
5
5
  faraday (~> 2.11)
6
6
  ostruct (~> 0.6.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.1.3.4)
11
+ activesupport (8.0.2)
12
12
  base64
13
+ benchmark (>= 0.3)
13
14
  bigdecimal
14
- concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ concurrent-ruby (~> 1.0, >= 1.3.1)
15
16
  connection_pool (>= 2.2.5)
16
17
  drb
17
18
  i18n (>= 1.6, < 2)
19
+ logger (>= 1.4.2)
18
20
  minitest (>= 5.1)
19
- mutex_m
20
- tzinfo (~> 2.0)
21
- ast (2.4.2)
22
- base64 (0.2.0)
23
- bigdecimal (3.1.8)
24
- concurrent-ruby (1.3.3)
25
- connection_pool (2.4.1)
21
+ securerandom (>= 0.3)
22
+ tzinfo (~> 2.0, >= 2.0.5)
23
+ uri (>= 0.13.1)
24
+ ast (2.4.3)
25
+ base64 (0.3.0)
26
+ benchmark (0.4.1)
27
+ bigdecimal (3.2.2)
28
+ concurrent-ruby (1.3.5)
29
+ connection_pool (2.5.3)
26
30
  date (3.4.1)
27
- dotenv (3.1.2)
28
- drb (2.2.1)
31
+ dotenv (3.1.8)
32
+ drb (2.2.3)
29
33
  erb (5.0.1)
30
34
  faraday (2.13.1)
31
35
  faraday-net_http (>= 2.0, < 3.5)
32
36
  json
33
37
  logger
34
- faraday-net_http (3.1.1)
35
- net-http
36
- i18n (1.14.5)
38
+ faraday-net_http (3.4.0)
39
+ net-http (>= 0.5.0)
40
+ i18n (1.14.7)
37
41
  concurrent-ruby (~> 1.0)
38
42
  io-console (0.8.0)
39
43
  irb (1.15.2)
40
44
  pp (>= 0.6.0)
41
45
  rdoc (>= 4.0.0)
42
46
  reline (>= 0.4.2)
43
- json (2.7.2)
44
- language_server-protocol (3.17.0.3)
45
- logger (1.6.0)
46
- minitest (5.24.1)
47
- mutex_m (0.2.0)
48
- net-http (0.4.1)
47
+ json (2.12.2)
48
+ language_server-protocol (3.17.0.5)
49
+ lint_roller (1.1.0)
50
+ logger (1.7.0)
51
+ minitest (5.25.5)
52
+ net-http (0.6.0)
49
53
  uri
50
54
  ostruct (0.6.1)
51
- parallel (1.25.1)
52
- parser (3.3.4.0)
55
+ parallel (1.27.0)
56
+ parser (3.3.8.0)
53
57
  ast (~> 2.4.1)
54
58
  racc
55
59
  pp (0.6.2)
56
60
  prettyprint
57
61
  prettyprint (0.2.0)
62
+ prism (1.4.0)
58
63
  psych (5.2.6)
59
64
  date
60
65
  stringio
61
66
  racc (1.8.1)
62
- rack (3.1.7)
67
+ rack (3.1.16)
63
68
  rainbow (3.1.1)
64
69
  rake (12.3.3)
65
70
  rdoc (6.14.0)
66
71
  erb
67
72
  psych (>= 4.0.0)
68
- regexp_parser (2.9.2)
73
+ regexp_parser (2.10.0)
69
74
  reline (0.6.1)
70
75
  io-console (~> 0.5)
71
- rexml (3.3.4)
72
- strscan
73
- rubocop (1.65.1)
76
+ rubocop (1.76.1)
74
77
  json (~> 2.3)
75
- language_server-protocol (>= 3.17.0)
78
+ language_server-protocol (~> 3.17.0.2)
79
+ lint_roller (~> 1.1.0)
76
80
  parallel (~> 1.10)
77
81
  parser (>= 3.3.0.2)
78
82
  rainbow (>= 2.2.2, < 4.0)
79
- regexp_parser (>= 2.4, < 3.0)
80
- rexml (>= 3.2.5, < 4.0)
81
- rubocop-ast (>= 1.31.1, < 2.0)
83
+ regexp_parser (>= 2.9.3, < 3.0)
84
+ rubocop-ast (>= 1.45.0, < 2.0)
82
85
  ruby-progressbar (~> 1.7)
83
- unicode-display_width (>= 2.4.0, < 3.0)
84
- rubocop-ast (1.31.3)
85
- parser (>= 3.3.1.0)
86
- rubocop-minitest (0.35.1)
87
- rubocop (>= 1.61, < 2.0)
88
- rubocop-ast (>= 1.31.1, < 2.0)
89
- rubocop-performance (1.21.1)
90
- rubocop (>= 1.48.1, < 2.0)
91
- rubocop-ast (>= 1.31.1, < 2.0)
92
- rubocop-rails (2.25.1)
86
+ unicode-display_width (>= 2.4.0, < 4.0)
87
+ rubocop-ast (1.45.1)
88
+ parser (>= 3.3.7.2)
89
+ prism (~> 1.4)
90
+ rubocop-performance (1.25.0)
91
+ lint_roller (~> 1.1)
92
+ rubocop (>= 1.75.0, < 2.0)
93
+ rubocop-ast (>= 1.38.0, < 2.0)
94
+ rubocop-rails (2.32.0)
93
95
  activesupport (>= 4.2.0)
96
+ lint_roller (~> 1.1)
94
97
  rack (>= 1.1)
95
- rubocop (>= 1.33.0, < 2.0)
96
- rubocop-ast (>= 1.31.1, < 2.0)
97
- rubocop-rails-omakase (1.0.0)
98
- rubocop
99
- rubocop-minitest
100
- rubocop-performance
101
- rubocop-rails
98
+ rubocop (>= 1.75.0, < 2.0)
99
+ rubocop-ast (>= 1.44.0, < 2.0)
100
+ rubocop-rails-omakase (1.1.0)
101
+ rubocop (>= 1.72)
102
+ rubocop-performance (>= 1.24)
103
+ rubocop-rails (>= 2.30)
102
104
  ruby-progressbar (1.13.0)
105
+ securerandom (0.4.1)
103
106
  stringio (3.1.7)
104
- strscan (3.1.0)
105
107
  tzinfo (2.0.6)
106
108
  concurrent-ruby (~> 1.0)
107
- unicode-display_width (2.5.0)
108
- uri (0.13.0)
109
- vcr (6.2.0)
109
+ unicode-display_width (3.1.4)
110
+ unicode-emoji (~> 4.0, >= 4.0.4)
111
+ unicode-emoji (4.0.4)
112
+ uri (1.0.3)
113
+ vcr (6.3.1)
114
+ base64
110
115
 
111
116
  PLATFORMS
112
117
  ruby
@@ -37,6 +37,10 @@ module Spotify
37
37
  PlaylistsResource.new(self)
38
38
  end
39
39
 
40
+ def tracks
41
+ TracksResource.new(self)
42
+ end
43
+
40
44
  def connection
41
45
  @connection ||= Faraday.new(BASE_URL) do |conn|
42
46
  conn.request :authorization, :Bearer, access_token
@@ -0,0 +1,12 @@
1
+ module Spotify
2
+ class TracksResource < Resource
3
+ def list(ids:, **params)
4
+ response = get_request("tracks", params: { ids: ids }.merge(params))
5
+ Collection.from_response(response, type: Track, key: "tracks")
6
+ end
7
+ def get(id:, **params)
8
+ response = get_request("tracks/#{id}", params: params)
9
+ Playlist.new response.body
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module Spotify
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/spotify.rb CHANGED
@@ -21,6 +21,7 @@ module Spotify
21
21
  autoload :AlbumsResource, "spotify/resources/albums"
22
22
  autoload :ArtistsResource, "spotify/resources/artists"
23
23
  autoload :PlaylistsResource, "spotify/resources/playlists"
24
+ autoload :TracksResource, "spotify/resources/tracks"
24
25
 
25
26
  autoload :User, "spotify/objects/user"
26
27
  autoload :Album, "spotify/objects/album"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotifyrb
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
  - Dean Perry
@@ -81,6 +81,7 @@ files:
81
81
  - lib/spotify/resources/player.rb
82
82
  - lib/spotify/resources/playlists.rb
83
83
  - lib/spotify/resources/search.rb
84
+ - lib/spotify/resources/tracks.rb
84
85
  - lib/spotify/resources/users.rb
85
86
  - lib/spotify/version.rb
86
87
  - lib/spotifyrb.rb