Class: PlatformAPI::Domain
- Inherits:
-
Object
- Object
- PlatformAPI::Domain
- Defined in:
- lib/platform-api/client.rb
Overview
Domains define what web routes should be routed to an app on Heroku.
Instance Method Summary collapse
-
#create(app_id_or_app_name, body = {}) ⇒ Object
Create a new domain.
-
#delete(app_id_or_app_name, domain_id_or_domain_hostname) ⇒ Object
Delete an existing domain.
-
#info(app_id_or_app_name, domain_id_or_domain_hostname) ⇒ Object
Info for existing domain.
-
#initialize(client) ⇒ Domain
constructor
A new instance of Domain.
-
#list(app_id_or_app_name) ⇒ Object
List existing domains.
-
#update(app_id_or_app_name, domain_id_or_domain_hostname, body = {}) ⇒ Object
Associate an SNI endpoint.
Constructor Details
#initialize(client) ⇒ Domain
Returns a new instance of Domain.
1686 1687 1688 |
# File 'lib/platform-api/client.rb', line 1686 def initialize(client) @client = client end |
Instance Method Details
#create(app_id_or_app_name, body = {}) ⇒ Object
Create a new domain.
1694 1695 1696 |
# File 'lib/platform-api/client.rb', line 1694 def create(app_id_or_app_name, body = {}) @client.domain.create(app_id_or_app_name, body) end |
#delete(app_id_or_app_name, domain_id_or_domain_hostname) ⇒ Object
Delete an existing domain
1711 1712 1713 |
# File 'lib/platform-api/client.rb', line 1711 def delete(app_id_or_app_name, domain_id_or_domain_hostname) @client.domain.delete(app_id_or_app_name, domain_id_or_domain_hostname) end |
#info(app_id_or_app_name, domain_id_or_domain_hostname) ⇒ Object
Info for existing domain.
1719 1720 1721 |
# File 'lib/platform-api/client.rb', line 1719 def info(app_id_or_app_name, domain_id_or_domain_hostname) @client.domain.info(app_id_or_app_name, domain_id_or_domain_hostname) end |
#list(app_id_or_app_name) ⇒ Object
List existing domains.
1726 1727 1728 |
# File 'lib/platform-api/client.rb', line 1726 def list(app_id_or_app_name) @client.domain.list(app_id_or_app_name) end |
#update(app_id_or_app_name, domain_id_or_domain_hostname, body = {}) ⇒ Object
Associate an SNI endpoint
1703 1704 1705 |
# File 'lib/platform-api/client.rb', line 1703 def update(app_id_or_app_name, domain_id_or_domain_hostname, body = {}) @client.domain.update(app_id_or_app_name, domain_id_or_domain_hostname, body) end |