new Fly(apiKey, resourceTypeopt)
Create a Fly API Client
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
apiKey |
string | Fly.io access token | ||
resourceType |
string |
<optional> |
apps | Site type (`apps` or `sites`) |
Methods
(async) deleteHostname(name, hostname) → {Promise}
Delete a site hostname
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the site |
hostname |
string | Hostname to delete |
Returns:
Promise object represents the API response
- Type
- Promise
(async) getHostname(name, hostname) → {Promise}
Get a hostname of a site
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the site |
hostname |
string | The requested hostname |
Returns:
Promise object represents the API response
- Type
- Promise
(async) getHostnames(name) → {Promise}
List a site's hostnames
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the site |
Returns:
Promise object represents the API response
- Type
- Promise
(async) postHostname(name, hostname) → {Promise}
Create a new site hostname
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the site |
hostname |
string | The new hostname |
Returns:
Promise object represents the API response
- Type
- Promise