class Spaceship::Portal::WebsitePush

Represents an Website Push ID from the Developer Portal

Attributes

app_id[RW]

@return (String) The identifier of this website push, provided by the Dev Portal @example

"RGAWZGXSAA"
bundle_id[RW]

@return (String) The bundle_id (website identifier) of website push id @example

"web.com.krausefx.app"
name[RW]

@return (String) The name you provided for this website push @example

"Spaceship"
platform[RW]

@return (String) the supported platform of this website push @example

"ios"
prefix[RW]

Prefix provided by the Dev Portal @example

"5A997XSHK2"
status[RW]

@return (String) Status of the website push @example

"current"
website_id[RW]

@return (String) The identifier of this website push, provided by the Dev Portal @example

"RGAWZGXSAA"

Public Class Methods

all(mac: false) click to toggle source

@param mac [Bool] Fetches Mac website push if true @return (Array) Returns all website push available for this account

# File spaceship/lib/spaceship/portal/website_push.rb, line 50
def all(mac: false)
  client.website_push(mac: mac).map { |website_push| self.new(website_push) }
end
create!(bundle_id: nil, name: nil, mac: false) click to toggle source

Creates a new Website Push ID on the Apple Dev Portal

@param bundle_id [String] the bundle id (website_push_identifier) of the website push @param name [String] the name of the Website Push @param mac [Bool] is this a Mac Website Push? @return (Website Push) The Website Push you just created

# File spaceship/lib/spaceship/portal/website_push.rb, line 60
def create!(bundle_id: nil, name: nil, mac: false)
  new_website_push = client.create_website_push!(name, bundle_id, mac: mac)
  self.new(new_website_push)
end
find(bundle_id, mac: false) click to toggle source

Find a specific Website Push ID based on the bundle_id @param mac [Bool] Searches Mac website pushes if true @return (Website Push) The website push you're looking for. This is nil if the website push can't be found.

# File spaceship/lib/spaceship/portal/website_push.rb, line 68
def find(bundle_id, mac: false)
  all(mac: mac).find do |website_push|
    website_push.bundle_id == bundle_id
  end
end

Public Instance Methods

delete!() click to toggle source

Delete this Website Push ID. @return (Website Push) The website you just deleted

# File spaceship/lib/spaceship/portal/website_push.rb, line 77
def delete!
  client.delete_website_push!(website_id, mac: mac?)
  self
end
mac?() click to toggle source

@return (Bool) Is this a Mac website push?

# File spaceship/lib/spaceship/portal/website_push.rb, line 83
def mac?
  platform == 'mac'
end