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.



1660
1661
1662
# File 'lib/platform-api/client.rb', line 1660

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



1668
1669
1670
# File 'lib/platform-api/client.rb', line 1668

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

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



1685
1686
1687
# File 'lib/platform-api/client.rb', line 1685

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



1693
1694
1695
# File 'lib/platform-api/client.rb', line 1693

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



1700
1701
1702
# File 'lib/platform-api/client.rb', line 1700

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



1677
1678
1679
# File 'lib/platform-api/client.rb', line 1677

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