Class: PlatformAPI::ReviewApp

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

Overview

An ephemeral app to review a set of changes

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ReviewApp

Returns a new instance of ReviewApp.



2708
2709
2710
# File 'lib/platform-api/client.rb', line 2708

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Create a new review app

Parameters:

  • body:

    the object to pass as the request payload



2715
2716
2717
# File 'lib/platform-api/client.rb', line 2715

def create(body = {})
  @client.review_app.create(body)
end

#delete(review_app_id) ⇒ Object

Delete an existing review app

Parameters:

  • review_app_id:

    unique identifier of the review app



2729
2730
2731
# File 'lib/platform-api/client.rb', line 2729

def delete(review_app_id)
  @client.review_app.delete(review_app_id)
end

#get_review_app(review_app_id) ⇒ Object

Gets an existing review app

Parameters:

  • review_app_id:

    unique identifier of the review app



2722
2723
2724
# File 'lib/platform-api/client.rb', line 2722

def get_review_app(review_app_id)
  @client.review_app.get_review_app(review_app_id)
end

#get_review_app_by_app_id(app_id_or_app_name) ⇒ Object

Get a review app using the associated app_id

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



2736
2737
2738
# File 'lib/platform-api/client.rb', line 2736

def get_review_app_by_app_id(app_id_or_app_name)
  @client.review_app.get_review_app_by_app_id(app_id_or_app_name)
end

#list(pipeline_id) ⇒ Object

List review apps for a pipeline

Parameters:

  • pipeline_id:

    unique identifier of pipeline



2743
2744
2745
# File 'lib/platform-api/client.rb', line 2743

def list(pipeline_id)
  @client.review_app.list(pipeline_id)
end