Class: Spaceship::ConnectAPI::AppScreenshotSet

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb

Defined Under Namespace

Modules: DisplayType

Instance Attribute Summary collapse

Attributes included from Model

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model

#attr_mapping, included, #initialize, #to_json, #update_attributes

Instance Attribute Details

#app_screenshotsObject

Returns the value of attribute app_screenshots


11
12
13
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 11

def app_screenshots
  @app_screenshots
end

#screenshot_display_typeObject

Returns the value of attribute screenshot_display_type


9
10
11
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 9

def screenshot_display_type
  @screenshot_display_type
end

Class Method Details

.all(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object

API


115
116
117
118
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 115

def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
  resp = Spaceship::ConnectAPI.get_app_screenshot_sets(filter: filter, includes: includes, limit: limit, sort: sort)
  return resp.to_models
end

.typeObject


99
100
101
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 99

def self.type
  return "appScreenshotSets"
end

Instance Method Details

#apple_tv?Boolean

Returns:

  • (Boolean)

103
104
105
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 103

def apple_tv?
  DisplayType::APP_APPLE_TV == screenshot_display_type
end

#imessage?Boolean

Returns:

  • (Boolean)

107
108
109
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 107

def imessage?
  DisplayType::ALL_IMESSAGE.include?(screenshot_display_type)
end

#reorder_screenshots(app_screenshot_ids: nil) ⇒ Object


124
125
126
127
128
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 124

def reorder_screenshots(app_screenshot_ids: nil)
  Spaceship::ConnectAPI.patch_app_screenshot_set_screenshots(app_screenshot_set_id: id, app_screenshot_ids: app_screenshot_ids)

  return Spaceship::ConnectAPI.get_app_screenshot_set(app_screenshot_set_id: id, includes: "appScreenshots").first
end

#upload_screenshot(path: nil, wait_for_processing: true) ⇒ Object


120
121
122
# File 'spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb', line 120

def upload_screenshot(path: nil, wait_for_processing: true)
  return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path, wait_for_processing: wait_for_processing)
end