Class: FlowApi::Rest

Inherits:
DefaultRest
  • Object
show all
Defined in:
lib/flow_api/manager.rb

Class Method Summary collapse

Class Method Details

.base_paramsObject



12
13
14
15
16
# File 'lib/flow_api/manager.rb', line 12

def base_params
  {
    api_token: ENV["FLOW_PROJECT_API_TOKEN"]
  }
end

.basic_optionsObject



18
19
20
# File 'lib/flow_api/manager.rb', line 18

def basic_options
  @tmp ||= super.merge(other_base_execute_option: { log: Logger.new(STDOUT) })
end

.basic_urlObject



8
9
10
# File 'lib/flow_api/manager.rb', line 8

def basic_url
  ENV["FLOW_DOMAIN"] || "http://api-lyon.flow.ci"
end

.send_log_json(project_id, job_id, json_str) ⇒ Object



22
23
24
25
# File 'lib/flow_api/manager.rb', line 22

def send_log_json(project_id, job_id, json_str)
  path = "/jobs/#{job_id}/upload_test_log_details"
  patch(path, project_id: project_id, json_str: json_str)
end