Class: Spaceship::Tunes::AppImage
- Defined in:
- lib/spaceship/tunes/app_image.rb
Overview
Represents an image hosted on iTunes Connect. Used for icons, screenshots, etc
Direct Known Subclasses
Constant Summary collapse
- HOST_URL =
"https://is1-ssl.mzstatic.com/image/thumb"
Instance Attribute Summary collapse
-
#asset_token ⇒ Object
Returns the value of attribute asset_token.
-
#is_imessage ⇒ Object
Returns the value of attribute is_imessage.
-
#original_file_name ⇒ Object
Returns the value of attribute original_file_name.
-
#sort_order ⇒ Object
Returns the value of attribute sort_order.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TunesBase
Methods inherited from Base
attr_accessor, attr_mapping, #attributes, attributes, #initialize, #inspect, mapping_module, method_missing, set_client, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#asset_token ⇒ Object
Returns the value of attribute asset_token.
7 8 9 |
# File 'lib/spaceship/tunes/app_image.rb', line 7 def asset_token @asset_token end |
#is_imessage ⇒ Object
Returns the value of attribute is_imessage.
15 16 17 |
# File 'lib/spaceship/tunes/app_image.rb', line 15 def @is_imessage end |
#original_file_name ⇒ Object
Returns the value of attribute original_file_name.
11 12 13 |
# File 'lib/spaceship/tunes/app_image.rb', line 11 def original_file_name @original_file_name end |
#sort_order ⇒ Object
Returns the value of attribute sort_order.
9 10 11 |
# File 'lib/spaceship/tunes/app_image.rb', line 9 def sort_order @sort_order end |
#url ⇒ Object
Returns the value of attribute url.
13 14 15 |
# File 'lib/spaceship/tunes/app_image.rb', line 13 def url @url end |
Class Method Details
.factory(attrs) ⇒ Object
25 26 27 |
# File 'lib/spaceship/tunes/app_image.rb', line 25 def factory(attrs) self.new(attrs) end |
Instance Method Details
#reset!(attrs = {}) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/spaceship/tunes/app_image.rb', line 30 def reset!(attrs = {}) update_raw_data!( { asset_token: nil, original_file_name: nil, sort_order: nil, url: nil }.merge(attrs) ) end |
#setup ⇒ Object
41 42 43 44 |
# File 'lib/spaceship/tunes/app_image.rb', line 41 def setup # Since September 2015 we don't get the url any more, so we have to manually build it self.url = "#{HOST_URL}/#{self.asset_token}/0x0ss.jpg" end |