rspotify 2.6.0 → 2.6.1

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
  SHA1:
3
- metadata.gz: 8bc7c509b39843b4eadaaf91148cfe735a850908
4
- data.tar.gz: e2757b03a0eb8dcd677e10f5317a558485701a1a
3
+ metadata.gz: 59c34bf71f214c47a5119f269b79451204658dd8
4
+ data.tar.gz: b6b7e1e0adb4b392bf3a829d200820a434427142
5
5
  SHA512:
6
- metadata.gz: 30531c4d431ae5774e792c31b1684b500acc43438e605ccdcd22aeb8a5d6d4e332a9c9fbdd8cca9ef0bbe7e366c7e7f3e78db1619724fa3b7ed228dea0cfbd2d
7
- data.tar.gz: 6f4a5d9428e7161e3102f44e4ec993e165f2aa44cd494f3e539a0ad48736becd302c8196b5d92887b4328fd87efac14b9514a763b8e370cbf13cfcf563243e28
6
+ metadata.gz: 885ac9c2f2b2218e5f31c48ffa9585e5f98496457fb90ab0e5ded962fa26ac2220bc196ae2d7a85258372dc2c31ff598a5a22c46f379ab4a18c33362ebbf352f
7
+ data.tar.gz: 66265e27d689adb88a2336b2be6e724c1e2e49fe4506bf6c84fb8dca801b4148cadfc7a72a89a91d9fac10c081f54100951d874e91146c84831643512abd2437
data/lib/rspotify/base.rb CHANGED
@@ -30,7 +30,6 @@ module RSpotify
30
30
  warn 'Spotify API does not support finding several users simultaneously'
31
31
  return false
32
32
  end
33
- limit = (type == 'album' ? 20 : 50)
34
33
  find_many(ids, type, market: market)
35
34
  when String
36
35
  id = ids
@@ -143,7 +142,7 @@ module RSpotify
143
142
  frameborder: 0,
144
143
  allowtransparency: true,
145
144
  view: nil,
146
- theme: nil,
145
+ theme: nil
147
146
  }
148
147
  options = default_options.merge(options)
149
148
 
@@ -9,7 +9,7 @@ module RSpotify
9
9
  API_URI = 'https://api.spotify.com/v1/'.freeze
10
10
  AUTHORIZE_URI = 'https://accounts.spotify.com/authorize'.freeze
11
11
  TOKEN_URI = 'https://accounts.spotify.com/api/token'.freeze
12
- VERBS = %w(get post put delete)
12
+ VERBS = %w[get post put delete].freeze
13
13
 
14
14
  class << self
15
15
  attr_accessor :raw_response
@@ -4,18 +4,19 @@ module RSpotify
4
4
  def initialize(user, options = {})
5
5
  @user = user
6
6
 
7
- @repeat_state = options['repeat_state']
8
- @shuffle_state = options['shuffle_state']
9
- @progress = options['progress_ms']
10
- @is_playing = options['is_playing']
7
+ @repeat_state = options['repeat_state']
8
+ @shuffle_state = options['shuffle_state']
9
+ @progress = options['progress_ms']
10
+ @is_playing = options['is_playing']
11
+ @currently_playing_type = options['currently_playing_type']
11
12
 
12
13
  @track = if options['track']
13
- Track.new options['track']
14
- end
14
+ Track.new options['track']
15
+ end
15
16
 
16
17
  @device = if options['device']
17
- Device.new options['device']
18
- end
18
+ Device.new options['device']
19
+ end
19
20
  end
20
21
 
21
22
  def playing?
@@ -28,7 +29,7 @@ module RSpotify
28
29
  # @example
29
30
  # player = user.player
30
31
  # player.play_context(nil,"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT")
31
- def play_context(device_id=nil, uri)
32
+ def play_context(device_id = nil, uri)
32
33
  params = {"context_uri": uri}
33
34
  play(device_id, params)
34
35
  end
@@ -40,7 +41,7 @@ module RSpotify
40
41
  # player = user.player
41
42
  # tracks_uris = ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]
42
43
  # player.play_tracks(nil, tracks_uris)
43
- def play_tracks(device_id=nil, uris)
44
+ def play_tracks(device_id = nil, uris)
44
45
  params = {"uris": uris}
45
46
  play(device_id, params)
46
47
  end
@@ -52,7 +53,7 @@ module RSpotify
52
53
  # player = user.player
53
54
  # player.play_track(nil, "spotify:track:4iV5W9uYEdYUVa79Axb7Rh")
54
55
  # # User must be a premium subscriber for this feature to work.
55
- def play_track(device_id=nil, uri)
56
+ def play_track(device_id = nil, uri)
56
57
  params = {"uris": [uri]}
57
58
  play(device_id, params)
58
59
  end
@@ -65,7 +66,7 @@ module RSpotify
65
66
  # player.play
66
67
  def play(device_id = nil, params = {})
67
68
  url = "me/player/play"
68
- url = device_id.nil? ? url : url+"?device_id=#{device_id}"
69
+ url = device_id.nil? ? url : "#{url}?device_id=#{device_id}"
69
70
 
70
71
  User.oauth_put(@user.id, url, params.to_json)
71
72
  end
@@ -1,3 +1,3 @@
1
1
  module RSpotify
2
- VERSION = '2.6.0'
2
+ VERSION = '2.6.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspotify
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Sad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-11 00:00:00.000000000 Z
11
+ date: 2019-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2