Class: PlatformAPI::Domain

Inherits:
Object
  • Object
show all
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

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.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



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.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



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

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • domain_id_or_domain_hostname:

    unique identifier of this domain or full hostname



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.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • domain_id_or_domain_hostname:

    unique identifier of this domain or full hostname



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.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



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

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • domain_id_or_domain_hostname:

    unique identifier of this domain or full hostname

  • body:

    the object to pass as the request payload



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