Class: PlatformAPI::Client
- Inherits:
-
Object
- Object
- PlatformAPI::Client
- Defined in:
- lib/platform-api/client.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 and attached to one or more apps.
-
#addon_action ⇒ AddonAction
Add-on Actions are Provider functionality for specific add-on installations.
-
#addon_attachment ⇒ AddonAttachment
An add-on attachment represents a connection between an app and an add-on that it has been given access to.
-
#addon_region_capability ⇒ AddonRegionCapability
Add-on region capabilities represent the relationship between an Add-on Service and a specific Region.
-
#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
A buildpack installation 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.
-
#event ⇒ Event
An event represents an action performed on another API resource.
-
#failed_event ⇒ FailedEvent
A failed event represents a failure of an action performed on another API resource.
-
#filter_apps ⇒ FilterApps
Filters are special endpoints to allow for API consumers to specify a subset of resources to consume in order to reduce the number of requests that are performed.
-
#formation ⇒ Formation
The formation of processes that should be maintained for an app.
-
#inbound_ruleset ⇒ InboundRuleset
An inbound-ruleset is a collection of rules that specify what hosts can or cannot connect to an application.
-
#initialize(client) ⇒ Client
constructor
A new instance of Client.
-
#invitation ⇒ Invitation
An invitation represents an invite sent to a user to use the Heroku platform.
-
#invoice ⇒ Invoice
An invoice is an itemized bill of goods for an account which includes pricing and charges.
-
#invoice_address ⇒ InvoiceAddress
An invoice address represents the address that should be listed on an invoice.
-
#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 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_addon ⇒ OrganizationAddon
A list of add-ons the Organization uses across all apps.
-
#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_invoice ⇒ OrganizationInvoice
An organization invoice is an itemized bill of goods for an organization which includes pricing and charges.
-
#organization_member ⇒ OrganizationMember
An organization member is an individual with access to an organization.
-
#organization_payment_method ⇒ OrganizationPaymentMethod
The on file payment method for an account.
-
#organization_preferences ⇒ OrganizationPreferences
Tracks an organization's preferences.
-
#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.
-
#password_reset ⇒ PasswordReset
A password reset represents a in-process password reset attempt.
-
#payment ⇒ Payment
A payment represents money collected for an account.
-
#payment_method ⇒ PaymentMethod
The on file payment method for an account.
-
#pipeline ⇒ Pipeline
A pipeline allows grouping of apps into different stages.
-
#pipeline_coupling ⇒ PipelineCoupling
Information about an app's coupling to a pipeline.
-
#pipeline_promotion ⇒ PipelinePromotion
Promotions allow you to move code from an app in a pipeline to all targets.
-
#pipeline_promotion_target ⇒ PipelinePromotionTarget
Promotion targets represent an individual app being promoted to.
-
#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.
-
#sms_number ⇒ SmsNumber
SMS numbers are used for recovery on accounts with two-factor authentication enabled.
-
#source ⇒ Source
A source is a location for uploading and downloading an application's source code.
-
#space ⇒ Space
A space is an isolated, highly available, secure app execution environments, running in the modern VPC substrate.
-
#space_app_access ⇒ SpaceAppAccess
Space access represents the permissions a particular user has on a particular space.
-
#space_nat ⇒ SpaceNat
Network address translation (NAT) for stable outbound IP addresses from a space.
-
#ssl_endpoint ⇒ SSLEndpoint
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.
-
#user_preferences ⇒ UserPreferences
Tracks a user's preferences and message dismissals.
-
#whitelisted_addon_service ⇒ WhitelistedAddonService
Entities that have been whitelisted to be used by an Organization.
Constructor Details
#initialize(client) ⇒ Client
Returns a new instance of Client.
88 89 90 |
# File 'lib/platform-api/client.rb', line 88 def initialize(client) @client = client end |
Instance Method Details
#account ⇒ Account
An account represents an individual signed up to use the Heroku platform.
102 103 104 |
# File 'lib/platform-api/client.rb', line 102 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.
95 96 97 |
# File 'lib/platform-api/client.rb', line 95 def account_feature @account_feature_resource ||= AccountFeature.new(@client) end |
#addon ⇒ Addon
Add-ons represent add-ons that have been provisioned and attached to one or more apps.
137 138 139 |
# File 'lib/platform-api/client.rb', line 137 def addon @addon_resource ||= Addon.new(@client) end |
#addon_action ⇒ AddonAction
Add-on Actions are Provider functionality for specific add-on installations
109 110 111 |
# File 'lib/platform-api/client.rb', line 109 def addon_action @addon_action_resource ||= AddonAction.new(@client) end |
#addon_attachment ⇒ AddonAttachment
An add-on attachment represents a connection between an app and an add-on that it has been given access to.
116 117 118 |
# File 'lib/platform-api/client.rb', line 116 def @addon_attachment_resource ||= AddonAttachment.new(@client) end |
#addon_region_capability ⇒ AddonRegionCapability
Add-on region capabilities represent the relationship between an Add-on Service and a specific Region
123 124 125 |
# File 'lib/platform-api/client.rb', line 123 def addon_region_capability @addon_region_capability_resource ||= AddonRegionCapability.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.
130 131 132 |
# File 'lib/platform-api/client.rb', line 130 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.
165 166 167 |
# File 'lib/platform-api/client.rb', line 165 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.
144 145 146 |
# File 'lib/platform-api/client.rb', line 144 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.
151 152 153 |
# File 'lib/platform-api/client.rb', line 151 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.
158 159 160 |
# File 'lib/platform-api/client.rb', line 158 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
179 180 181 |
# File 'lib/platform-api/client.rb', line 179 def build @build_resource ||= Build.new(@client) end |
#build_result ⇒ BuildResult
A build result contains the output from a build.
172 173 174 |
# File 'lib/platform-api/client.rb', line 172 def build_result @build_result_resource ||= BuildResult.new(@client) end |
#buildpack_installation ⇒ BuildpackInstallation
A buildpack installation represents a buildpack that will be run against an app.
186 187 188 |
# File 'lib/platform-api/client.rb', line 186 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.
193 194 195 |
# File 'lib/platform-api/client.rb', line 193 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.
200 201 202 |
# File 'lib/platform-api/client.rb', line 200 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.
207 208 209 |
# File 'lib/platform-api/client.rb', line 207 def credit @credit_resource ||= Credit.new(@client) end |
#domain ⇒ Domain
Domains define what web routes should be routed to an app on Heroku.
214 215 216 |
# File 'lib/platform-api/client.rb', line 214 def domain @domain_resource ||= Domain.new(@client) end |
#dyno ⇒ Dyno
Dynos encapsulate running processes of an app on Heroku. Detailed information about dyno sizes can be found at: https://devcenter.heroku.com/articles/dyno-types.
221 222 223 |
# File 'lib/platform-api/client.rb', line 221 def dyno @dyno_resource ||= Dyno.new(@client) end |
#event ⇒ Event
An event represents an action performed on another API resource.
228 229 230 |
# File 'lib/platform-api/client.rb', line 228 def event @event_resource ||= Event.new(@client) end |
#failed_event ⇒ FailedEvent
A failed event represents a failure of an action performed on another API resource.
235 236 237 |
# File 'lib/platform-api/client.rb', line 235 def failed_event @failed_event_resource ||= FailedEvent.new(@client) end |
#filter_apps ⇒ FilterApps
Filters are special endpoints to allow for API consumers to specify a subset of resources to consume in order to reduce the number of requests that are performed. Each filter endpoint endpoint is responsible for determining its supported request format. The endpoints are over POST in order to handle large request bodies without hitting request uri query length limitations, but the requests themselves are idempotent and will not have side effects.
242 243 244 |
# File 'lib/platform-api/client.rb', line 242 def filter_apps @filter_apps_resource ||= FilterApps.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 currently released on an app.
249 250 251 |
# File 'lib/platform-api/client.rb', line 249 def formation @formation_resource ||= Formation.new(@client) end |
#inbound_ruleset ⇒ InboundRuleset
An inbound-ruleset is a collection of rules that specify what hosts can or cannot connect to an application.
256 257 258 |
# File 'lib/platform-api/client.rb', line 256 def inbound_ruleset @inbound_ruleset_resource ||= InboundRuleset.new(@client) end |
#invitation ⇒ Invitation
An invitation represents an invite sent to a user to use the Heroku platform.
263 264 265 |
# File 'lib/platform-api/client.rb', line 263 def invitation @invitation_resource ||= Invitation.new(@client) end |
#invoice ⇒ Invoice
An invoice is an itemized bill of goods for an account which includes pricing and charges.
277 278 279 |
# File 'lib/platform-api/client.rb', line 277 def invoice @invoice_resource ||= Invoice.new(@client) end |
#invoice_address ⇒ InvoiceAddress
An invoice address represents the address that should be listed on an invoice.
270 271 272 |
# File 'lib/platform-api/client.rb', line 270 def invoice_address @invoice_address_resource ||= InvoiceAddress.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.
284 285 286 |
# File 'lib/platform-api/client.rb', line 284 def key @key_resource ||= Key.new(@client) end |
#log_drain ⇒ LogDrain
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.
291 292 293 |
# File 'lib/platform-api/client.rb', line 291 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.
298 299 300 |
# File 'lib/platform-api/client.rb', line 298 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
305 306 307 |
# File 'lib/platform-api/client.rb', line 305 def @oauth_authorization_resource ||= 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.
312 313 314 |
# File 'lib/platform-api/client.rb', line 312 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
319 320 321 |
# File 'lib/platform-api/client.rb', line 319 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
326 327 328 |
# File 'lib/platform-api/client.rb', line 326 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.
382 383 384 |
# File 'lib/platform-api/client.rb', line 382 def organization @organization_resource ||= Organization.new(@client) end |
#organization_addon ⇒ OrganizationAddon
A list of add-ons the Organization uses across all apps
333 334 335 |
# File 'lib/platform-api/client.rb', line 333 def organization_addon @organization_addon_resource ||= OrganizationAddon.new(@client) end |
#organization_app ⇒ OrganizationApp
An organization app encapsulates the organization specific functionality of Heroku apps.
347 348 349 |
# File 'lib/platform-api/client.rb', line 347 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.
340 341 342 |
# File 'lib/platform-api/client.rb', line 340 def organization_app_collaborator @organization_app_collaborator_resource ||= OrganizationAppCollaborator.new(@client) end |
#organization_invoice ⇒ OrganizationInvoice
An organization invoice is an itemized bill of goods for an organization which includes pricing and charges.
354 355 356 |
# File 'lib/platform-api/client.rb', line 354 def organization_invoice @organization_invoice_resource ||= OrganizationInvoice.new(@client) end |
#organization_member ⇒ OrganizationMember
An organization member is an individual with access to an organization.
361 362 363 |
# File 'lib/platform-api/client.rb', line 361 def organization_member @organization_member_resource ||= OrganizationMember.new(@client) end |
#organization_payment_method ⇒ OrganizationPaymentMethod
The on file payment method for an account
368 369 370 |
# File 'lib/platform-api/client.rb', line 368 def organization_payment_method @organization_payment_method_resource ||= OrganizationPaymentMethod.new(@client) end |
#organization_preferences ⇒ OrganizationPreferences
Tracks an organization's preferences
375 376 377 |
# File 'lib/platform-api/client.rb', line 375 def organization_preferences @organization_preferences_resource ||= OrganizationPreferences.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.
389 390 391 |
# File 'lib/platform-api/client.rb', line 389 def otp_secret @otp_secret_resource ||= OtpSecret.new(@client) end |
#password_reset ⇒ PasswordReset
A password reset represents a in-process password reset attempt.
396 397 398 |
# File 'lib/platform-api/client.rb', line 396 def password_reset @password_reset_resource ||= PasswordReset.new(@client) end |
#payment ⇒ Payment
A payment represents money collected for an account
410 411 412 |
# File 'lib/platform-api/client.rb', line 410 def payment @payment_resource ||= Payment.new(@client) end |
#payment_method ⇒ PaymentMethod
The on file payment method for an account
403 404 405 |
# File 'lib/platform-api/client.rb', line 403 def payment_method @payment_method_resource ||= PaymentMethod.new(@client) end |
#pipeline ⇒ Pipeline
A pipeline allows grouping of apps into different stages.
438 439 440 |
# File 'lib/platform-api/client.rb', line 438 def pipeline @pipeline_resource ||= Pipeline.new(@client) end |
#pipeline_coupling ⇒ PipelineCoupling
Information about an app's coupling to a pipeline
417 418 419 |
# File 'lib/platform-api/client.rb', line 417 def pipeline_coupling @pipeline_coupling_resource ||= PipelineCoupling.new(@client) end |
#pipeline_promotion ⇒ PipelinePromotion
Promotions allow you to move code from an app in a pipeline to all targets
431 432 433 |
# File 'lib/platform-api/client.rb', line 431 def pipeline_promotion @pipeline_promotion_resource ||= PipelinePromotion.new(@client) end |
#pipeline_promotion_target ⇒ PipelinePromotionTarget
Promotion targets represent an individual app being promoted to
424 425 426 |
# File 'lib/platform-api/client.rb', line 424 def pipeline_promotion_target @pipeline_promotion_target_resource ||= PipelinePromotionTarget.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.
445 446 447 |
# File 'lib/platform-api/client.rb', line 445 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.
452 453 454 |
# File 'lib/platform-api/client.rb', line 452 def rate_limit @rate_limit_resource ||= RateLimit.new(@client) end |
#recovery_code ⇒ RecoveryCode
Recovery codes grant access to accounts with two-factor authentication enabled.
459 460 461 |
# File 'lib/platform-api/client.rb', line 459 def recovery_code @recovery_code_resource ||= RecoveryCode.new(@client) end |
#region ⇒ Region
A region represents a geographic location in which your application may run.
466 467 468 |
# File 'lib/platform-api/client.rb', line 466 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.
473 474 475 |
# File 'lib/platform-api/client.rb', line 473 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.
480 481 482 |
# File 'lib/platform-api/client.rb', line 480 def slug @slug_resource ||= Slug.new(@client) end |
#sms_number ⇒ SmsNumber
SMS numbers are used for recovery on accounts with two-factor authentication enabled.
487 488 489 |
# File 'lib/platform-api/client.rb', line 487 def sms_number @sms_number_resource ||= SmsNumber.new(@client) end |
#source ⇒ Source
A source is a location for uploading and downloading an application's source code.
494 495 496 |
# File 'lib/platform-api/client.rb', line 494 def source @source_resource ||= Source.new(@client) end |
#space ⇒ Space
A space is an isolated, highly available, secure app execution environments, running in the modern VPC substrate.
515 516 517 |
# File 'lib/platform-api/client.rb', line 515 def space @space_resource ||= Space.new(@client) end |
#space_app_access ⇒ SpaceAppAccess
Space access represents the permissions a particular user has on a particular space.
501 502 503 |
# File 'lib/platform-api/client.rb', line 501 def space_app_access @space_app_access_resource ||= SpaceAppAccess.new(@client) end |
#space_nat ⇒ SpaceNat
Network address translation (NAT) for stable outbound IP addresses from a space
508 509 510 |
# File 'lib/platform-api/client.rb', line 508 def space_nat @space_nat_resource ||= SpaceNat.new(@client) end |
#ssl_endpoint ⇒ SSLEndpoint
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.
522 523 524 |
# File 'lib/platform-api/client.rb', line 522 def ssl_endpoint @ssl_endpoint_resource ||= SSLEndpoint.new(@client) end |
#stack ⇒ Stack
Stacks are the different application execution environments available in the Heroku platform.
529 530 531 |
# File 'lib/platform-api/client.rb', line 529 def stack @stack_resource ||= Stack.new(@client) end |
#user_preferences ⇒ UserPreferences
Tracks a user's preferences and message dismissals
536 537 538 |
# File 'lib/platform-api/client.rb', line 536 def user_preferences @user_preferences_resource ||= UserPreferences.new(@client) end |
#whitelisted_addon_service ⇒ WhitelistedAddonService
Entities that have been whitelisted to be used by an Organization
543 544 545 |
# File 'lib/platform-api/client.rb', line 543 def whitelisted_addon_service @whitelisted_addon_service_resource ||= WhitelistedAddonService.new(@client) end |