Class: Spaceship::Portal::WebsitePush
- Inherits:
-
Spaceship::PortalBase
- Object
- Base
- Spaceship::PortalBase
- Spaceship::Portal::WebsitePush
- Defined in:
- spaceship/lib/spaceship/portal/website_push.rb
Overview
Represents an Website Push ID from the Developer Portal
Instance Attribute Summary collapse
-
#bundle_id ⇒ String
The bundle_id (website identifier) of website push id.
-
#name ⇒ String
The name you provided for this website push.
-
#platform ⇒ String
The supported platform of this website push.
-
#prefix ⇒ Object
Prefix provided by the Dev Portal.
-
#status ⇒ String
Status of the website push.
-
#website_id ⇒ String
The identifier of this website push, provided by the Dev Portal.
Attributes inherited from Base
Class Method Summary collapse
-
.all(mac: false) ⇒ Array
Returns all website push available for this account.
-
.create!(bundle_id: nil, name: nil, mac: false) ⇒ Website Push
Creates a new Website Push ID on the Apple Dev Portal.
-
.find(bundle_id, mac: false) ⇒ Website Push
Find a specific Website Push ID based on the bundle_id.
Instance Method Summary collapse
-
#delete! ⇒ Website Push
Delete this Website Push ID.
-
#mac? ⇒ Bool
Is this a Mac website push?.
Methods inherited from Spaceship::PortalBase
Methods inherited from Base
attr_accessor, attr_mapping, attributes, #attributes, factory, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#bundle_id ⇒ String
Returns The bundle_id (website identifier) of website push id.
30 31 32 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 30 def bundle_id @bundle_id end |
#name ⇒ String
Returns The name you provided for this website push.
15 16 17 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 15 def name @name end |
#platform ⇒ String
Returns the supported platform of this website push.
20 21 22 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 20 def platform @platform end |
#prefix ⇒ Object
Prefix provided by the Dev Portal
25 26 27 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 25 def prefix @prefix end |
#status ⇒ String
Returns Status of the website push.
35 36 37 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 35 def status @status end |
#website_id ⇒ String
Returns The identifier of this website push, provided by the Dev Portal.
10 11 12 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 10 def website_id @website_id end |
Class Method Details
.all(mac: false) ⇒ Array
Returns all website push available for this account
48 49 50 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 48 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) ⇒ Website Push
Creates a new Website Push ID on the Apple Dev Portal
58 59 60 61 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 58 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) ⇒ Website Push
Find a specific Website Push ID based on the bundle_id
66 67 68 69 70 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 66 def find(bundle_id, mac: false) all(mac: mac).find do |website_push| website_push.bundle_id == bundle_id end end |
Instance Method Details
#delete! ⇒ Website Push
Delete this Website Push ID.
75 76 77 78 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 75 def delete! client.delete_website_push!(website_id, mac: mac?) self end |
#mac? ⇒ Bool
Returns Is this a Mac website push?.
81 82 83 |
# File 'spaceship/lib/spaceship/portal/website_push.rb', line 81 def mac? platform == 'mac' end |