Class: PlatformAPI::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Build

Returns a new instance of Build.



933
934
935
# File 'lib/platform-api/client.rb', line 933

def initialize(client)
  @client = client
end

Instance Method Details

#create(app_id_or_app_name, body) ⇒ Object

Create a new build.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



941
942
943
# File 'lib/platform-api/client.rb', line 941

def create(app_id_or_app_name, body)
  @client.build.create(app_id_or_app_name, body)
end

#info(app_id_or_app_name, build_id) ⇒ Object

Info for existing build.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • build_id:

    unique identifier of build



949
950
951
# File 'lib/platform-api/client.rb', line 949

def info(app_id_or_app_name, build_id)
  @client.build.info(app_id_or_app_name, build_id)
end

#list(app_id_or_app_name) ⇒ Object

List existing build.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



956
957
958
# File 'lib/platform-api/client.rb', line 956

def list(app_id_or_app_name)
  @client.build.list(app_id_or_app_name)
end