Class: SnapDeploy::Provider::Heroku::API::Client
- Inherits:
-
Object
- Object
- SnapDeploy::Provider::Heroku::API::Client
- Defined in:
- lib/snap_deploy/provider/heroku/api.rb
Overview
The platform API empowers developers to automate, extend and combine Heroku with other services.
Instance Method Summary collapse
-
#account ⇒ Account
An account represents an individual signed up to use the Heroku platform.
-
#account_feature ⇒ AccountFeature
An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.
-
#addon ⇒ Addon
Add-ons represent add-ons that have been provisioned for an app.
-
#addon_service ⇒ AddonService
Add-on services represent add-ons that may be provisioned for apps.
-
#app ⇒ App
An app represents the program that you would like to deploy and run on Heroku.
-
#app_feature ⇒ AppFeature
An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku.
-
#app_setup ⇒ AppSetup
An app setup represents an app on Heroku that is setup using an environment, addons, and scripts described in an app.json manifest file.
-
#app_transfer ⇒ AppTransfer
An app transfer represents a two party interaction for transferring ownership of an app.
-
#build ⇒ Build
A build represents the process of transforming a code tarball into a slug.
-
#build_result ⇒ BuildResult
A build result contains the output from a build.
-
#buildpack_installation ⇒ BuildpackInstallation
An buildpack installtion represents a buildpack that will be run against an app.
-
#collaborator ⇒ Collaborator
A collaborator represents an account that has been given access to an app on Heroku.
-
#config_var ⇒ ConfigVar
Config Vars allow you to manage the configuration information provided to an app on Heroku.
-
#credit ⇒ Credit
A credit represents value that will be used up before further charges are assigned to an account.
-
#domain ⇒ Domain
Domains define what web routes should be routed to an app on Heroku.
-
#dyno ⇒ Dyno
Dynos encapsulate running processes of an app on Heroku.
-
#formation ⇒ Formation
The formation of processes that should be maintained for an app.
-
#initialize(client) ⇒ Client
constructor
A new instance of Client.
-
#invoice ⇒ Invoice
An invoice is an itemized bill of goods for an account which includes pricing and charges.
-
#key ⇒ Key
Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.
-
#log_drain ⇒ LogDrain
[Log drains](devcenter.heroku.com/articles/log-drains) provide a way to forward your Heroku logs to an external syslog server for long-term archiving.
-
#log_session ⇒ LogSession
A log session is a reference to the http based log stream for an app.
-
#oauth_authorization ⇒ OauthAuthorization
OAuth authorizations represent clients that a Heroku user has authorized to automate, customize or extend their usage of the platform.
-
#oauth_client ⇒ OauthClient
OAuth clients are applications that Heroku users can authorize to automate, customize or extend their usage of the platform.
-
#oauth_grant ⇒ OauthGrant
OAuth grants are used to obtain authorizations on behalf of a user.
-
#oauth_token ⇒ OauthToken
OAuth tokens provide access for authorized clients to act on behalf of a Heroku user to automate, customize or extend their usage of the platform.
-
#organization ⇒ Organization
Organizations allow you to manage access to a shared group of applications across your development team.
-
#organization_app ⇒ OrganizationApp
An organization app encapsulates the organization specific functionality of Heroku apps.
-
#organization_app_collaborator ⇒ OrganizationAppCollaborator
An organization collaborator represents an account that has been given access to an organization app on Heroku.
-
#organization_member ⇒ OrganizationMember
An organization member is an individual with access to an organization.
-
#otp_secret ⇒ OtpSecret
This renders a secret that clients can use to build a one-time password to be supplied as a 2nd factor of authentication.
-
#payment ⇒ Payment
A payment represents money collected for an account.
-
#payment_method ⇒ PaymentMethod
The on file payment method for an account.
-
#plan ⇒ Plan
Plans represent different configurations of add-ons that may be added to apps.
-
#rate_limit ⇒ RateLimit
Rate Limit represents the number of request tokens each account holds.
-
#recovery_code ⇒ RecoveryCode
Recovery codes grant access to accounts with two-factor authentication enabled.
-
#region ⇒ Region
A region represents a geographic location in which your application may run.
-
#release ⇒ Release
A release represents a combination of code, config vars and add-ons for an app on Heroku.
-
#slug ⇒ Slug
A slug is a snapshot of your application code that is ready to run on the platform.
-
#source ⇒ Source
A source is a location for uploading and downloading an application’s source code.
-
#ssl_endpoint ⇒ SSLEndpoint
[SSL Endpoint](devcenter.heroku.com/articles/ssl-endpoint) is a public address serving custom SSL cert for HTTPS traffic to a Heroku app.
-
#stack ⇒ Stack
Stacks are the different application execution environments available in the Heroku platform.
Constructor Details
#initialize(client) ⇒ Client
Returns a new instance of Client.
89 90 91 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 89 def initialize(client) @client = client end |
Instance Method Details
#account ⇒ Account
An account represents an individual signed up to use the Heroku platform.
103 104 105 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 103 def account @account_resource ||= Account.new(@client) end |
#account_feature ⇒ AccountFeature
An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.
96 97 98 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 96 def account_feature @account_feature_resource ||= AccountFeature.new(@client) end |
#addon ⇒ Addon
Add-ons represent add-ons that have been provisioned for an app.
117 118 119 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 117 def addon @addon_resource ||= Addon.new(@client) end |
#addon_service ⇒ AddonService
Add-on services represent add-ons that may be provisioned for apps. Endpoints under add-on services can be accessed without authentication.
110 111 112 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 110 def addon_service @addon_service_resource ||= AddonService.new(@client) end |
#app ⇒ App
An app represents the program that you would like to deploy and run on Heroku.
145 146 147 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 145 def app @app_resource ||= App.new(@client) end |
#app_feature ⇒ AppFeature
An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku.
124 125 126 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 124 def app_feature @app_feature_resource ||= AppFeature.new(@client) end |
#app_setup ⇒ AppSetup
An app setup represents an app on Heroku that is setup using an environment, addons, and scripts described in an app.json manifest file.
131 132 133 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 131 def app_setup @app_setup_resource ||= AppSetup.new(@client) end |
#app_transfer ⇒ AppTransfer
An app transfer represents a two party interaction for transferring ownership of an app.
138 139 140 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 138 def app_transfer @app_transfer_resource ||= AppTransfer.new(@client) end |
#build ⇒ Build
A build represents the process of transforming a code tarball into a slug
159 160 161 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 159 def build @build_resource ||= Build.new(@client) end |
#build_result ⇒ BuildResult
A build result contains the output from a build.
152 153 154 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 152 def build_result @build_result_resource ||= BuildResult.new(@client) end |
#buildpack_installation ⇒ BuildpackInstallation
An buildpack installtion represents a buildpack that will be run against an app.
166 167 168 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 166 def buildpack_installation @buildpack_installation_resource ||= BuildpackInstallation.new(@client) end |
#collaborator ⇒ Collaborator
A collaborator represents an account that has been given access to an app on Heroku.
173 174 175 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 173 def collaborator @collaborator_resource ||= Collaborator.new(@client) end |
#config_var ⇒ ConfigVar
Config Vars allow you to manage the configuration information provided to an app on Heroku.
180 181 182 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 180 def config_var @config_var_resource ||= ConfigVar.new(@client) end |
#credit ⇒ Credit
A credit represents value that will be used up before further charges are assigned to an account.
187 188 189 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 187 def credit @credit_resource ||= Credit.new(@client) end |
#domain ⇒ Domain
Domains define what web routes should be routed to an app on Heroku.
194 195 196 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 194 def domain @domain_resource ||= Domain.new(@client) end |
#dyno ⇒ Dyno
Dynos encapsulate running processes of an app on Heroku.
201 202 203 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 201 def dyno @dyno_resource ||= Dyno.new(@client) end |
#formation ⇒ Formation
The formation of processes that should be maintained for an app. Update the formation to scale processes or change dyno sizes. Available process type names and commands are defined by the ‘process_types` attribute for the [slug](#slug) currently released on an app.
208 209 210 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 208 def formation @formation_resource ||= Formation.new(@client) end |
#invoice ⇒ Invoice
An invoice is an itemized bill of goods for an account which includes pricing and charges.
215 216 217 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 215 def invoice @invoice_resource ||= Invoice.new(@client) end |
#key ⇒ Key
Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.
222 223 224 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 222 def key @key_resource ||= Key.new(@client) end |
#log_drain ⇒ LogDrain
[Log drains](devcenter.heroku.com/articles/log-drains) provide a way to forward your Heroku logs to an external syslog server for long-term archiving. This external service must be configured to receive syslog packets from Heroku, whereupon its URL can be added to an app using this API. Some addons will add a log drain when they are provisioned to an app. These drains can only be removed by removing the add-on.
229 230 231 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 229 def log_drain @log_drain_resource ||= LogDrain.new(@client) end |
#log_session ⇒ LogSession
A log session is a reference to the http based log stream for an app.
236 237 238 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 236 def log_session @log_session_resource ||= LogSession.new(@client) end |
#oauth_authorization ⇒ OauthAuthorization
OAuth authorizations represent clients that a Heroku user has authorized to automate, customize or extend their usage of the platform. For more information please refer to the [Heroku OAuth documentation](devcenter.heroku.com/articles/oauth)
243 244 245 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 243 def ||= OauthAuthorization.new(@client) end |
#oauth_client ⇒ OauthClient
OAuth clients are applications that Heroku users can authorize to automate, customize or extend their usage of the platform. For more information please refer to the [Heroku OAuth documentation](devcenter.heroku.com/articles/oauth).
250 251 252 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 250 def oauth_client @oauth_client_resource ||= OauthClient.new(@client) end |
#oauth_grant ⇒ OauthGrant
OAuth grants are used to obtain authorizations on behalf of a user. For more information please refer to the [Heroku OAuth documentation](devcenter.heroku.com/articles/oauth)
257 258 259 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 257 def oauth_grant @oauth_grant_resource ||= OauthGrant.new(@client) end |
#oauth_token ⇒ OauthToken
OAuth tokens provide access for authorized clients to act on behalf of a Heroku user to automate, customize or extend their usage of the platform. For more information please refer to the [Heroku OAuth documentation](devcenter.heroku.com/articles/oauth)
264 265 266 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 264 def oauth_token @oauth_token_resource ||= OauthToken.new(@client) end |
#organization ⇒ Organization
Organizations allow you to manage access to a shared group of applications across your development team.
292 293 294 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 292 def organization @organization_resource ||= Organization.new(@client) end |
#organization_app ⇒ OrganizationApp
An organization app encapsulates the organization specific functionality of Heroku apps.
278 279 280 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 278 def organization_app @organization_app_resource ||= OrganizationApp.new(@client) end |
#organization_app_collaborator ⇒ OrganizationAppCollaborator
An organization collaborator represents an account that has been given access to an organization app on Heroku.
271 272 273 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 271 def organization_app_collaborator @organization_app_collaborator_resource ||= OrganizationAppCollaborator.new(@client) end |
#organization_member ⇒ OrganizationMember
An organization member is an individual with access to an organization.
285 286 287 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 285 def organization_member @organization_member_resource ||= OrganizationMember.new(@client) end |
#otp_secret ⇒ OtpSecret
This renders a secret that clients can use to build a one-time password to be supplied as a 2nd factor of authentication.
299 300 301 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 299 def otp_secret @otp_secret_resource ||= OtpSecret.new(@client) end |
#payment ⇒ Payment
A payment represents money collected for an account
306 307 308 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 306 def payment @payment_resource ||= Payment.new(@client) end |
#payment_method ⇒ PaymentMethod
The on file payment method for an account
313 314 315 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 313 def payment_method @payment_method_resource ||= PaymentMethod.new(@client) end |
#plan ⇒ Plan
Plans represent different configurations of add-ons that may be added to apps. Endpoints under add-on services can be accessed without authentication.
320 321 322 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 320 def plan @plan_resource ||= Plan.new(@client) end |
#rate_limit ⇒ RateLimit
Rate Limit represents the number of request tokens each account holds. Requests to this endpoint do not count towards the rate limit.
327 328 329 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 327 def rate_limit @rate_limit_resource ||= RateLimit.new(@client) end |
#recovery_code ⇒ RecoveryCode
Recovery codes grant access to accounts with two-factor authentication enabled.
334 335 336 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 334 def recovery_code @recovery_code_resource ||= RecoveryCode.new(@client) end |
#region ⇒ Region
A region represents a geographic location in which your application may run.
341 342 343 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 341 def region @region_resource ||= Region.new(@client) end |
#release ⇒ Release
A release represents a combination of code, config vars and add-ons for an app on Heroku.
348 349 350 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 348 def release @release_resource ||= Release.new(@client) end |
#slug ⇒ Slug
A slug is a snapshot of your application code that is ready to run on the platform.
355 356 357 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 355 def slug @slug_resource ||= Slug.new(@client) end |
#source ⇒ Source
A source is a location for uploading and downloading an application’s source code.
362 363 364 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 362 def source @source_resource ||= Source.new(@client) end |
#ssl_endpoint ⇒ SSLEndpoint
[SSL Endpoint](devcenter.heroku.com/articles/ssl-endpoint) is a public address serving custom SSL cert for HTTPS traffic to a Heroku app. Note that an app must have the ‘ssl:endpoint` addon installed before it can provision an SSL Endpoint using these APIs.
369 370 371 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 369 def ssl_endpoint @ssl_endpoint_resource ||= SSLEndpoint.new(@client) end |
#stack ⇒ Stack
Stacks are the different application execution environments available in the Heroku platform.
376 377 378 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 376 def stack @stack_resource ||= Stack.new(@client) end |