grooveshark 0.2.12 → 0.2.13

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: 265e469716c245b3c4421d9b1f4a97e9808c3371
4
- data.tar.gz: 4e1d82a8c9b0c9e3c12f40d200052ad4d7398c43
3
+ metadata.gz: c843eab31ff57bc1d3054c4fd0f5b5187da7b5aa
4
+ data.tar.gz: 19560cda396fec78d7de1c47d2bf2b9810dd2563
5
5
  SHA512:
6
- metadata.gz: 8a9732cce0fdaf0edafd248efae89676f7003c1b4c6fa02fabbaadcb19d78cde55bb2fc69ab488abe124f5a3417f66cbec617b531782ca4177f8ce730b3a0a9f
7
- data.tar.gz: b7d86f7a0ae7cc1170b3e62ad4bbadbaad2014472eca7c054abbcc56e5cb3db9f181e7e9d8b27ce1c9c66b230cf83243e96802ec2edf69b38bd44cf8e47f5448
6
+ metadata.gz: 0f30ff12934dfea5802862ed51d3d984cf4d6f3e7cfd097dc980188c467f1e31581e6575a65549634574ce1668615132c1940f346da855dd6b291904134d49c4
7
+ data.tar.gz: ab02c7a541c0310065e5c2717db85f2b91db94b0cfd1145524b03f1c4419161681d5eeb17bb174ece1212fc519bed86168d58e6d8144bbf7e9fa1413ae269272
@@ -4,19 +4,20 @@ module Grooveshark
4
4
  class Playlist
5
5
  attr_reader :id, :user_id
6
6
  attr_reader :name, :about, :picture, :username
7
- attr_reader :songs
7
+ attr_reader :songs, :num_songs
8
8
 
9
9
  def initialize(client, data = nil, user_id = nil)
10
10
  @client = client
11
11
  @songs = []
12
12
 
13
13
  return if data.nil?
14
- @id = data['playlist_id']
15
- @name = data['name']
16
- @about = data['about']
17
- @picture = data['picture']
18
- @user_id = data['user_id'] || user_id
19
- @username = data['user_name']
14
+ @id = data['playlist_id']
15
+ @name = data['name']
16
+ @about = data['about']
17
+ @picture = data['picture']
18
+ @user_id = data['user_id'] || user_id
19
+ @username = data['f_name']
20
+ @num_songs = data['num_songs'].to_i
20
21
  end
21
22
 
22
23
  # Fetch playlist songs
@@ -1,4 +1,4 @@
1
1
  # Grooveshark module
2
2
  module Grooveshark
3
- VERSION = '0.2.12'
3
+ VERSION = '0.2.13'
4
4
  end
@@ -15,13 +15,15 @@ describe 'Playlist' do
15
15
  'about' => 'me',
16
16
  'picture' => 'ruby.jpg',
17
17
  'user_id' => '2',
18
- 'user_name' => 'PierreRambaud')
18
+ 'f_name' => 'PierreRambaud',
19
+ 'num_songs' => '50')
19
20
  expect(playlist.id).to eq('1')
20
21
  expect(playlist.name).to eq('something')
21
22
  expect(playlist.about).to eq('me')
22
23
  expect(playlist.picture).to eq('ruby.jpg')
23
24
  expect(playlist.user_id).to eq('2')
24
25
  expect(playlist.username).to eq('PierreRambaud')
26
+ expect(playlist.num_songs).to eq(50)
25
27
  end
26
28
 
27
29
  it 'should initiliaze without data and user_id' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grooveshark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Sosedoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-08 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json