Class: Spaceship::ConnectAPI::App

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

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, #update_attributes

Instance Attribute Details

#bundle_idObject

Returns the value of attribute bundle_id.



10
11
12
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 10

def bundle_id
  @bundle_id
end

#is_aagObject

Returns the value of attribute is_aag.



14
15
16
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 14

def is_aag
  @is_aag
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#primary_localeObject

Returns the value of attribute primary_locale.



12
13
14
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 12

def primary_locale
  @primary_locale
end

#removedObject

Returns the value of attribute removed.



13
14
15
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 13

def removed
  @removed
end

#skuObject

Returns the value of attribute sku.



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

def sku
  @sku
end

Class Method Details

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

Apps



33
34
35
36
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 33

def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
  resps = Spaceship::ConnectAPI.get_apps(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
  return resps.flat_map(&:to_models)
end

.find(bundle_id) ⇒ Object



38
39
40
41
42
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 38

def self.find(bundle_id)
  return all(filter: { bundleId: bundle_id }).find do |app|
    app.bundle_id == bundle_id
  end
end

.get(app_id: nil, includes: nil) ⇒ Object



44
45
46
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 44

def self.get(app_id: nil, includes: nil)
  return Spaceship::ConnectAPI.get_app(app_id: app_id, includes: includes).first
end

.typeObject



25
26
27
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 25

def self.type
  return "apps"
end

Instance Method Details

#get_beta_app_localizations(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object



80
81
82
83
84
85
86
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 80

def get_beta_app_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
  filter ||= {}
  filter[:app] = id

  resps = Spaceship::ConnectAPI.get_beta_app_localizations(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
  return resps.flat_map(&:to_models)
end

#get_beta_groups(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object



88
89
90
91
92
93
94
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 88

def get_beta_groups(filter: {}, includes: nil, limit: nil, sort: nil)
  filter ||= {}
  filter[:app] = id

  resps = Spaceship::ConnectAPI.get_beta_groups(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
  return resps.flat_map(&:to_models)
end

#get_beta_testers(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object

Beta Testers



52
53
54
55
56
57
58
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 52

def get_beta_testers(filter: {}, includes: nil, limit: nil, sort: nil)
  filter ||= {}
  filter[:apps] = id

  resps = Spaceship::ConnectAPI.get_beta_testers(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
  return resps.flat_map(&:to_models)
end

#get_build_deliveries(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object



72
73
74
75
76
77
78
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 72

def get_build_deliveries(filter: {}, includes: nil, limit: nil, sort: nil)
  filter ||= {}
  filter[:app] = id

  resps = Spaceship::ConnectAPI.get_build_deliveries(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
  return resps.flat_map(&:to_models)
end

#get_builds(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object

Builds



64
65
66
67
68
69
70
# File 'spaceship/lib/spaceship/connect_api/models/app.rb', line 64

def get_builds(filter: {}, includes: nil, limit: nil, sort: nil)
  filter ||= {}
  filter[:app] = id

  resps = Spaceship::ConnectAPI.get_builds(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
  return resps.flat_map(&:to_models)
end