Sha256: f94b61853ecee92a11486b9c5a70bb02b2f222a9e106838b68c70bec673a54ab

Contents?: true

Size: 1.09 KB

Versions: 431

Compression:

Stored size: 1.09 KB

Contents

module Spaceship
  module Tunes
    # Represents an image hosted on iTunes Connect. Used for icons, screenshots, etc
    class AppImage < TunesBase
      HOST_URL = "https://is1-ssl.mzstatic.com/image/thumb"

      attr_accessor :asset_token

      attr_accessor :sort_order

      attr_accessor :original_file_name

      attr_accessor :url

      attr_accessor :is_imessage

      attr_mapping(
        'assetToken' => :asset_token,
        'sortOrder' => :sort_order,
        'url' => :url,
        'originalFileName' => :original_file_name
      )

      def reset!(attrs = {})
        update_raw_data!(
          {
            asset_token: nil,
            original_file_name: nil,
            sort_order: nil,
            url: nil
          }.merge(attrs)
        )
      end

      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

      private

      def update_raw_data!(hash)
        hash.each do |k, v|
          self.send("#{k}=", v)
        end
      end
    end
  end
end

Version data entries

431 entries across 431 versions & 1 rubygems

Version Path
fastlane-2.65.0.beta.20171107010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.64.0 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.64.0.beta.20171106010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.64.0.beta.20171105010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.64.0.beta.20171104010004 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.64.0.beta.20171103010004 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.64.0.beta.20171102010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.64.0.beta.20171101010004 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171031010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171030010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171029010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171028010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171027010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171026010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171025010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171024010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.62.1 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171023010003 spaceship/lib/spaceship/tunes/app_image.rb
fastlane-2.63.0.beta.20171022010003 spaceship/lib/spaceship/tunes/app_image.rb