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.
-
#create_deprecated(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.
1680 1681 1682 |
# File 'lib/platform-api/client.rb', line 1680 def initialize(client) @client = client end |
Instance Method Details
#create(app_id_or_app_name, body = {}) ⇒ Object
Create a new domain.
1696 1697 1698 |
# File 'lib/platform-api/client.rb', line 1696 def create(app_id_or_app_name, body = {}) @client.domain.create(app_id_or_app_name, body) end |
#create_deprecated(app_id_or_app_name, body = {}) ⇒ Object
Create a new domain. Deprecated in favor of this same endpoint, but with a new required attribute of sni_endpoint. During the transitional phase sni_endpoint can be omitted entirely (current behavior), can be a valid id, or can be null which will skip auto-association.
1688 1689 1690 |
# File 'lib/platform-api/client.rb', line 1688 def create_deprecated(app_id_or_app_name, body = {}) @client.domain.create_deprecated(app_id_or_app_name, body) end |
#delete(app_id_or_app_name, domain_id_or_domain_hostname) ⇒ Object
Delete an existing domain
1713 1714 1715 |
# File 'lib/platform-api/client.rb', line 1713 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.
1721 1722 1723 |
# File 'lib/platform-api/client.rb', line 1721 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.
1728 1729 1730 |
# File 'lib/platform-api/client.rb', line 1728 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
1705 1706 1707 |
# File 'lib/platform-api/client.rb', line 1705 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 |