class Spaceship::Portal::WebsitePush
Represents an Website Push ID from the Developer Portal
Attributes
@return (String
) The name you provided for this website push @example
"Spaceship"
@return (String
) the supported platform of this website push @example
"ios"
Prefix provided by the Dev Portal
@example
"5A997XSHK2"
@return (String
) Status of the website push @example
"current"
Public Class Methods
@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
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 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 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
@return (Bool) Is this a Mac website push?
# File spaceship/lib/spaceship/portal/website_push.rb, line 83 def mac? platform == 'mac' end