Class: Discogs::Label

Inherits:
Base
  • Object
show all
Defined in:
lib/label.rb

Constant Summary

Constants inherited from Base

Base::DISCOGS_BASE_URL

Instance Attribute Summary collapse

Attributes inherited from Base

#api_key, #request_string, #request_type

Instance Method Summary collapse

Methods inherited from Base

#fetched, #parsed

Constructor Details

#initialize(request_string) ⇒ Label

Returns a new instance of Label.



5
6
7
8
# File 'lib/label.rb', line 5

def initialize(request_string)
  @request_string = request_string
  super(@request_string, :label)
end

Instance Attribute Details

#contact_infoObject

Discogs Data



32
33
34
# File 'lib/label.rb', line 32

def contact_info
  @contact_info
end

#imagesObject

An array of image objects



21
22
23
# File 'lib/label.rb', line 21

def images
  @images
end

#nameObject

Discogs Data



16
17
18
# File 'lib/label.rb', line 16

def name
  @name
end

#parentObject

parent label if applicable



48
49
50
# File 'lib/label.rb', line 48

def parent
  @parent
end

#profileObject

Discogs Data



37
38
39
# File 'lib/label.rb', line 37

def profile
  @profile
end

#releasesObject

Be careful, this creates a Release object for each release. Data is lazy loaded, so an API call will be created as soon as you access the attributes



69
70
71
# File 'lib/label.rb', line 69

def releases
  @releases
end

#sublabelsObject

sublabels if applicable



56
57
58
# File 'lib/label.rb', line 56

def sublabels
  @sublabels
end

#urlsObject

Discogs Data An array of strings



43
44
45
# File 'lib/label.rb', line 43

def urls
  @urls
end

Instance Method Details

#labelObject

Discogs Data



11
12
13
# File 'lib/label.rb', line 11

def label
  @label ||= (parsed/'label')
end

#to_sObject

:nodoc:



78
79
80
# File 'lib/label.rb', line 78

def to_s #:nodoc:
  name
end