Class: MediumApi::Publication
- Inherits:
-
Struct
- Object
- Struct
- MediumApi::Publication
- Defined in:
- lib/medium_api/publication.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#contributors ⇒ Object
include ResourceApi.
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
2 3 4 |
# File 'lib/medium_api/publication.rb', line 2 def description @description end |
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/medium_api/publication.rb', line 2 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url
2 3 4 |
# File 'lib/medium_api/publication.rb', line 2 def image_url @image_url end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/medium_api/publication.rb', line 2 def name @name end |
#url ⇒ Object
Returns the value of attribute url
2 3 4 |
# File 'lib/medium_api/publication.rb', line 2 def url @url end |
Instance Method Details
#contributors ⇒ Object
include ResourceApi
5 6 7 8 9 10 11 |
# File 'lib/medium_api/publication.rb', line 5 def contributors data = MediumApi.client.publication_contributors(id) data.map do |contributor_attributes| Contributor.new(Utils.underscore_keys(contributor_attributes)) end end |