Class: CloudscrapeClient::Runs

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudscrape_client/runs.rb

Instance Method Summary collapse

Constructor Details

#initialize(id:) ⇒ Runs

Returns a new instance of Runs.



7
8
9
# File 'lib/cloudscrape_client/runs.rb', line 7

def initialize(id:)
  @id = id
end

Instance Method Details

#execute(input: {}, connect: false) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/cloudscrape_client/runs.rb', line 11

def execute(input: {}, connect: false)
  RunDTO.for(
    id: @id,
    url: (input.empty? ? "execute" : "execute/inputs"),
    input: input,
    connect: connect,
    method: :post
  ).fetch(:_id)
end