Class: PlatformAPI::Client

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

Constructor Details

#initialize(client) ⇒ Client

Returns a new instance of Client.



87
88
89
# File 'lib/platform-api/client.rb', line 87

def initialize(client)
  @client = client
end

Instance Method Details

#accountAccount

An account represents an individual signed up to use the Heroku platform.

Returns:



101
102
103
# File 'lib/platform-api/client.rb', line 101

def 
  @account_resource ||= Account.new(@client)
end

#account_featureAccountFeature

An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.

Returns:



94
95
96
# File 'lib/platform-api/client.rb', line 94

def 
  @account_feature_resource ||= AccountFeature.new(@client)
end

#addonAddon

Add-ons represent add-ons that have been provisioned for an app.

Returns:



115
116
117
# File 'lib/platform-api/client.rb', line 115

def addon
  @addon_resource ||= Addon.new(@client)
end

#addon_serviceAddonService

Add-on services represent add-ons that may be provisioned for apps.

Returns:



108
109
110
# File 'lib/platform-api/client.rb', line 108

def addon_service
  @addon_service_resource ||= AddonService.new(@client)
end

#appApp

An app represents the program that you would like to deploy and run on Heroku.

Returns:



143
144
145
# File 'lib/platform-api/client.rb', line 143

def app
  @app_resource ||= App.new(@client)
end

#app_featureAppFeature

An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku.

Returns:



122
123
124
# File 'lib/platform-api/client.rb', line 122

def app_feature
  @app_feature_resource ||= AppFeature.new(@client)
end

#app_setupAppSetup

An app setup represents an app on Heroku that is setup using an environment, addons, and scripts described in an app.json manifest file.

Returns:



129
130
131
# File 'lib/platform-api/client.rb', line 129

def app_setup
  @app_setup_resource ||= AppSetup.new(@client)
end

#app_transferAppTransfer

An app transfer represents a two party interaction for transferring ownership of an app.

Returns:



136
137
138
# File 'lib/platform-api/client.rb', line 136

def app_transfer
  @app_transfer_resource ||= AppTransfer.new(@client)
end

#buildBuild

A build represents the process of transforming a code tarball into a slug

Returns:



157
158
159
# File 'lib/platform-api/client.rb', line 157

def build
  @build_resource ||= Build.new(@client)
end

#build_resultBuildResult

A build result contains the output from a build.

Returns:



150
151
152
# File 'lib/platform-api/client.rb', line 150

def build_result
  @build_result_resource ||= BuildResult.new(@client)
end

#collaboratorCollaborator

A collaborator represents an account that has been given access to an app on Heroku.

Returns:



164
165
166
# File 'lib/platform-api/client.rb', line 164

def collaborator
  @collaborator_resource ||= Collaborator.new(@client)
end

#config_varConfigVar

Config Vars allow you to manage the configuration information provided to an app on Heroku.

Returns:



171
172
173
# File 'lib/platform-api/client.rb', line 171

def config_var
  @config_var_resource ||= ConfigVar.new(@client)
end

#domainDomain

Domains define what web routes should be routed to an app on Heroku.

Returns:



178
179
180
# File 'lib/platform-api/client.rb', line 178

def domain
  @domain_resource ||= Domain.new(@client)
end

#dynoDyno

Dynos encapsulate running processes of an app on Heroku.

Returns:



185
186
187
# File 'lib/platform-api/client.rb', line 185

def dyno
  @dyno_resource ||= Dyno.new(@client)
end

#formationFormation

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.

Returns:



192
193
194
# File 'lib/platform-api/client.rb', line 192

def formation
  @formation_resource ||= Formation.new(@client)
end

#keyKey

Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.

Returns:



199
200
201
# File 'lib/platform-api/client.rb', line 199

def key
  @key_resource ||= Key.new(@client)
end

#log_drainLogDrain

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.

Returns:



206
207
208
# File 'lib/platform-api/client.rb', line 206

def log_drain
  @log_drain_resource ||= LogDrain.new(@client)
end

#log_sessionLogSession

A log session is a reference to the http based log stream for an app.

Returns:



213
214
215
# File 'lib/platform-api/client.rb', line 213

def log_session
  @log_session_resource ||= LogSession.new(@client)
end

#oauth_authorizationOauthAuthorization

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

Returns:



220
221
222
# File 'lib/platform-api/client.rb', line 220

def oauth_authorization
  @oauth_authorization_resource ||= OauthAuthorization.new(@client)
end

#oauth_clientOauthClient

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.

Returns:



227
228
229
# File 'lib/platform-api/client.rb', line 227

def oauth_client
  @oauth_client_resource ||= OauthClient.new(@client)
end

#oauth_grantOauthGrant

OAuth grants are used to obtain authorizations on behalf of a user. For more information please refer to the Heroku OAuth documentation

Returns:



234
235
236
# File 'lib/platform-api/client.rb', line 234

def oauth_grant
  @oauth_grant_resource ||= OauthGrant.new(@client)
end

#oauth_tokenOauthToken

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

Returns:



241
242
243
# File 'lib/platform-api/client.rb', line 241

def oauth_token
  @oauth_token_resource ||= OauthToken.new(@client)
end

#organizationOrganization

Organizations allow you to manage access to a shared group of applications across your development team.

Returns:



269
270
271
# File 'lib/platform-api/client.rb', line 269

def organization
  @organization_resource ||= Organization.new(@client)
end

#organization_appOrganizationApp

An organization app encapsulates the organization specific functionality of Heroku apps.

Returns:



255
256
257
# File 'lib/platform-api/client.rb', line 255

def organization_app
  @organization_app_resource ||= OrganizationApp.new(@client)
end

#organization_app_collaboratorOrganizationAppCollaborator

An organization collaborator represents an account that has been given access to an organization app on Heroku.



248
249
250
# File 'lib/platform-api/client.rb', line 248

def organization_app_collaborator
  @organization_app_collaborator_resource ||= OrganizationAppCollaborator.new(@client)
end

#organization_memberOrganizationMember

An organization member is an individual with access to an organization.

Returns:



262
263
264
# File 'lib/platform-api/client.rb', line 262

def organization_member
  @organization_member_resource ||= OrganizationMember.new(@client)
end

#planPlan

Plans represent different configurations of add-ons that may be added to apps.

Returns:



276
277
278
# File 'lib/platform-api/client.rb', line 276

def plan
  @plan_resource ||= Plan.new(@client)
end

#rate_limitRateLimit

Rate Limit represents the number of request tokens each account holds. Requests to this endpoint do not count towards the rate limit.

Returns:



283
284
285
# File 'lib/platform-api/client.rb', line 283

def rate_limit
  @rate_limit_resource ||= RateLimit.new(@client)
end

#regionRegion

A region represents a geographic location in which your application may run.

Returns:



290
291
292
# File 'lib/platform-api/client.rb', line 290

def region
  @region_resource ||= Region.new(@client)
end

#releaseRelease

A release represents a combination of code, config vars and add-ons for an app on Heroku.

Returns:



297
298
299
# File 'lib/platform-api/client.rb', line 297

def release
  @release_resource ||= Release.new(@client)
end

#slugSlug

A slug is a snapshot of your application code that is ready to run on the platform.

Returns:



304
305
306
# File 'lib/platform-api/client.rb', line 304

def slug
  @slug_resource ||= Slug.new(@client)
end

#ssl_endpointSSLEndpoint

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.

Returns:



311
312
313
# File 'lib/platform-api/client.rb', line 311

def ssl_endpoint
  @ssl_endpoint_resource ||= SSLEndpoint.new(@client)
end

#stackStack

Stacks are the different application execution environments available in the Heroku platform.

Returns:



318
319
320
# File 'lib/platform-api/client.rb', line 318

def stack
  @stack_resource ||= Stack.new(@client)
end