Class: TestRail::APIClient

Inherits:
Object
  • Object
show all
Includes:
Endpoints
Defined in:
lib/testrail-ruby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Endpoints

#add_case, #add_milestone, #add_plan, #add_plan_entry, #add_project, #add_result, #add_result_for_case, #add_results, #add_results_for_cases, #add_run, #add_section, #add_suite, #close_plan, #close_run, #delete_case, #delete_milestone, #delete_plan, #delete_plan_entry, #delete_project, #delete_run, #delete_section, #delete_suite, #get_case, #get_cases, #get_milestone, #get_milestones, #get_plan, #get_plans, #get_project, #get_projects, #get_results, #get_results_for_case, #get_results_for_run, #get_run, #get_runs, #get_section, #get_sections, #get_suite, #get_suites, #get_test, #get_tests, #update_case, #update_milestone, #update_plan, #update_plan_entry, #update_project, #update_run, #update_section, #update_suite

Constructor Details

#initialize(base_url) ⇒ APIClient

:nocov:


25
26
27
28
29
30
# File 'lib/testrail-ruby.rb', line 25

def initialize(base_url)
  if !base_url.match(/\/$/)
    base_url += '/'
  end
  @url = base_url + 'index.php?/api/v2/'
end

Instance Attribute Details

#passwordObject

Returns the value of attribute password


22
23
24
# File 'lib/testrail-ruby.rb', line 22

def password
  @password
end

#userObject

Returns the value of attribute user


21
22
23
# File 'lib/testrail-ruby.rb', line 21

def user
  @user
end

Instance Method Details

#send_get(uri) ⇒ Object

:nocov:


33
34
35
# File 'lib/testrail-ruby.rb', line 33

def send_get(uri)
  _send_request('GET', uri)
end

#send_post(uri, data) ⇒ Object

:nocov:


39
40
41
# File 'lib/testrail-ruby.rb', line 39

def send_post(uri, data)
  _send_request('POST', uri, data)
end