decibel_wrapper 0.0.13 → 0.0.14

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjFhNmFkOTQ3YzQ2ODU4MTA1MjgyM2FmZmFjYTBkYmVkNDdiYzllZA==
4
+ ZmM5MDRjZmVjMGU1MzcxNjg4Njg2ZmM4ZDM5NDIwNTc4YWFmZTVjMQ==
5
5
  data.tar.gz: !binary |-
6
- OWY4OWM5ODUyYzRiNDUwNTFjODBkNzVkMDgxOTkwYmJhYzllMTRiZg==
6
+ ZDE2N2FlZGY4YmEwMDc5OTU0MDg4YjAxZGU1ZWEyMmI4ODE1MjIzNw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NGU3OWU0OGExNzU4ZDE2NDYxNjZhZmQ1Y2Q4OTM1MDMxOGU0OGQ3ZjRjZjg0
10
- ZTc0MjYxOTg3MzBhNGYzNDI1MjRiMmU5MGRiOWRmMTk1MDExNjVhYzdhNjli
11
- ZTY1MjZmNmNkZWFlZjdmOGMzYWViYmNlZjA5ODg2NmFiMzMyZDE=
9
+ MzQzMGMxNGU1Yjg0YjUxNjljNjU1ZTYxOWU3MjhiOGQxNGFiODlmMThhMDlk
10
+ YWI2NDc1M2FkZmNhYWI5Y2I4YjNmZTI3MDUxZDIyYmQ1M2ZlNDllOTEyMGJl
11
+ NjJmODYyNzc0YzQ2YmM5MmIzNTcxMDJiNDRlNTM3YjA2NmU3ZjY=
12
12
  data.tar.gz: !binary |-
13
- NDQ4YWE3ZjU2YjY2ZDYxYzcxYmUzNWYyN2UwMDhmNjUxZjNiODlhNDhhMGM1
14
- YjlkMmZlNGU1NGRlMjI4YTVjN2EwNzNlNDAwZDExNmVlNGNkMWM4YWI2M2I2
15
- ZDRlMGU5Y2YxYzNlOTdmYTE5OWY3NDRkN2ZiODJkNWU3ZDM1OTc=
13
+ NTA1YTYzN2I1NzZkMzNmMTgzOWE4ZjdlNWU2ZjYxZDRiOTY5NjljNDU5YzEy
14
+ MmM5MDcwNzQ0NmMzZTA1ZGNlYTJkM2RmZGU1NWZmNmU4NzNhMjg3MzMyNzVk
15
+ NTE1ODkwMzM3NzM4NDc5NzBmOTJkMDcyNjA5NWZhMDZjOTBiMjk=
@@ -1,3 +1,3 @@
1
1
  module DecibelWrapper
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  class Decibel::Album
2
2
 
3
- attr_accessor :Id, :Title, :FeaturedArtistString, :LiteralMainArtists, :FeaturedArtists, :IsUnofficial, :Identifiers, :Genres, :Tracks, :MainArtists, :OriginalReleaseDate, :ImageId, :ImageUrl, :ThumbnailUrl
3
+ attr_accessor :Id, :Title, :FeaturedArtistString, :ArtistsLiteral, :FeaturedArtists, :IsUnofficial, :Identifiers, :Genres, :Recordings, :Artists, :Participations, :OriginalReleaseDate, :ImageId, :ImageUrl, :ThumbnailUrl
4
4
 
5
5
  def initialize args
6
6
  args.each do |k, v|
@@ -13,8 +13,8 @@ class Decibel::Album
13
13
  self.identifiers_initialize if self.Identifiers
14
14
  self.featured_artists_initialize if self.FeaturedArtists
15
15
  self.genres_initialize if self.Genres
16
- self.tracks_initialize if self.Tracks
17
- self.artists_initialize if self.MainArtists
16
+ self.recordings_initialize if self.Recordings
17
+ self.artists_initialize if self.Artists
18
18
  end
19
19
 
20
20
  def identifiers_initialize
@@ -41,20 +41,28 @@ class Decibel::Album
41
41
  self.Genres = array
42
42
  end
43
43
 
44
- def tracks_initialize
44
+ def recordings_initialize
45
45
  array = []
46
- self.Tracks.each do |i|
46
+ self.Recordings.each do |i|
47
47
  array << Decibel::Recording.new(i)
48
48
  end
49
- self.Tracks = array
49
+ self.Recordings = array
50
50
  end
51
51
 
52
52
  def artists_initialize
53
53
  array = []
54
- self.MainArtists.each do |i|
54
+ self.Artists.each do |i|
55
55
  array << Decibel::Artist.new(i)
56
56
  end
57
- self.MainArtists = array
57
+ self.Artists = array
58
+ end
59
+
60
+ def participations_initialize
61
+ array = []
62
+ self.Participations.each do |i|
63
+ array << Decibel::Participation.new(i)
64
+ end
65
+ self.Participations = array
58
66
  end
59
67
 
60
68
  end
@@ -1,11 +1,33 @@
1
1
  class Decibel::Artist
2
2
 
3
- attr_accessor :LiteralName, :Id, :Name, :Probability
3
+ attr_accessor :Id, :Name, :StageName, :ArtistType, :Identifiers, :Annotations, :Members, :BirthDate, :DeathDate, :BirthPlace, :DeathPlace
4
4
 
5
5
  def initialize args
6
6
  args.each do |k, v|
7
7
  instance_variable_set("@#{k}", v) unless v.nil?
8
8
  end
9
+ self.child_initializers
10
+ end
11
+
12
+ def child_initializers
13
+ self.members_initialize if self.Members
14
+ self.annotations_initialize if self.Annotations
15
+ end
16
+
17
+ def members_initialize
18
+ array = []
19
+ self.Members.each do |m|
20
+ array << Decibel::Participant.new(m)
21
+ end
22
+ self.Members = array
23
+ end
24
+
25
+ def annotations_initialize
26
+ array = []
27
+ self.Annotations.each do |m|
28
+ array << m[:Text]
29
+ end
30
+ self.Annotations = array
9
31
  end
10
32
 
11
33
  end
@@ -1,6 +1,6 @@
1
1
  class Decibel::Participant
2
2
 
3
- attr_accessor :Id, :Name, :StageName, :Identifiers, :Annotations, :Members, :DateOfBirth, :DateOfDeath
3
+ attr_accessor :Id, :Name, :StageName, :ArtistType, :Identifiers, :Annotations, :Members, :BirthDate, :DeathDate, :BirthPlace, :DeathPlace
4
4
 
5
5
  def initialize args
6
6
  args.each do |k, v|
@@ -1,6 +1,7 @@
1
1
  class Decibel::Participation
2
2
 
3
- attr_accessor :LiteralMainIdentities, :MainIdentities, :LiteralActivity, :Activities, :LiteralArtists, :Artists
3
+ attr_accessor :ActivityLiteral, :Activities, :ArtistsLiteral, :Artists, :IsFeatured
4
+ # Removed :LiteralMainIdentities, :MainIdentities,
4
5
 
5
6
  def initialize args
6
7
  args.each do |k, v|
@@ -10,19 +11,11 @@ class Decibel::Participation
10
11
  end
11
12
 
12
13
  def child_initializers
13
- self.main_identities_initialize if self.MainIdentities
14
+ #self.main_identities_initialize if self.MainIdentities
14
15
  self.artists_initialize if self.Artists
15
16
  self.activities_initialize if self.Activities
16
17
  end
17
18
 
18
- def main_identities_initialize
19
- array = []
20
- self.MainIdentities.each do |i|
21
- array << Decibel::MainIdentity.new(i)
22
- end
23
- self.MainIdentities = array
24
- end
25
-
26
19
  def activities_initialize
27
20
  array = []
28
21
  self.Activities.each do |a|
@@ -39,4 +32,13 @@ class Decibel::Participation
39
32
  self.Artists = array
40
33
  end
41
34
 
35
+ # To Be Removed?
36
+ def main_identities_initialize
37
+ array = []
38
+ self.MainIdentities.each do |i|
39
+ array << Decibel::MainIdentity.new(i)
40
+ end
41
+ self.MainIdentities = array
42
+ end
43
+
42
44
  end
@@ -1,6 +1,6 @@
1
1
  class Decibel::Recording
2
2
 
3
- attr_accessor :Id, :AlbumSequence, :Title, :Artists, :FeaturedArtistString, :Duration, :FeaturedArtists, :Genres, :Participations, :Authors
3
+ attr_accessor :Id, :AlbumSequence, :Title, :Duration, :MainArtistsLiteral, :Artists, :FeaturedArtistsLiteral, :FeaturedArtists, :Genres, :Identifiers, :Participations, :Works, :Identifiers
4
4
 
5
5
  def initialize args
6
6
  args.each do |k, v|
@@ -13,14 +13,15 @@ class Decibel::Recording
13
13
  self.featured_artists_initialize if self.FeaturedArtists
14
14
  self.genres_initialize if self.Genres
15
15
  self.participations_initialize if self.Participations
16
- self.authors_initialize if self.Authors
17
16
  self.artists_initialize if self.Artists
17
+ self.identifiers_initialize if self.Identifiers
18
+ self.works_initialize if self.Works
18
19
  end
19
20
 
20
21
  def featured_artists_initialize
21
22
  array = []
22
23
  self.FeaturedArtists.each do |a|
23
- array << Decibel::FeaturedArtist.new(a)
24
+ array << Decibel::Artist.new(a)
24
25
  end
25
26
  self.FeaturedArtists = array
26
27
  end
@@ -41,14 +42,6 @@ class Decibel::Recording
41
42
  self.Participations = array
42
43
  end
43
44
 
44
- def authors_initialize
45
- array = []
46
- self.Authors.each do |a|
47
- array << Decibel::Participation.new(a)
48
- end
49
- self.Authors = array
50
- end
51
-
52
45
  def artists_initialize
53
46
  array = []
54
47
  self.Artists.each do |a|
@@ -57,6 +50,22 @@ class Decibel::Recording
57
50
  self.Artists = array
58
51
  end
59
52
 
53
+ def identifiers_initialize
54
+ array = []
55
+ self.Identifiers.each do |i|
56
+ array << Decibel::Identifier.new(i)
57
+ end
58
+ self.Identifiers = array
59
+ end
60
+
61
+ def works_initialize
62
+ array = []
63
+ self.Works.each do |a|
64
+ array << Decibel::Work.new(a)
65
+ end
66
+ self.Works = array
67
+ end
68
+
60
69
  # Needs looking at for refactoring
61
70
  def child_initializer(object, child_object)
62
71
  array = []
@@ -1,6 +1,6 @@
1
1
  class Decibel::Work
2
2
 
3
- attr_accessor :Id, :Title, :Participations, :Tracks
3
+ attr_accessor :Id, :Name, :Title, :WorkType, :Participations, :Tracks
4
4
 
5
5
  def initialize args
6
6
  args.each do |k, v|
@@ -32,6 +32,22 @@ class Decibel::Wrapper
32
32
  end
33
33
  end
34
34
 
35
+ def artist(params)
36
+ response = self.query(Decibel::Wrapper.create_query_string('artist/?', params))
37
+ Decibel::Artist.new(response) if !response.nil?
38
+ end
39
+
40
+ def artists(params)
41
+ response = self.query(Decibel::Wrapper.create_query_string('artists/?', params))
42
+ if !response.nil?
43
+ array = []
44
+ response.each do |a|
45
+ array << Decibel::Artist.new(a)
46
+ end
47
+ array
48
+ end
49
+ end
50
+
35
51
  def disctags(params)
36
52
 
37
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decibel_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - tomallen400
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-22 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler