Class: TestRail::APIClient
- Inherits:
-
Object
- Object
- TestRail::APIClient
- Includes:
- Endpoints
- Defined in:
- lib/testrail-ruby.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(base_url) ⇒ APIClient
constructor
A new instance of APIClient.
- #send_get(uri, data) ⇒ Object
- #send_post(uri, data) ⇒ Object
Methods included from Endpoints
#add_case, #add_milestone, #add_plan, #add_plan_entries, #add_result, #add_result_for_case, #add_run, #add_section, #add_suite, #close_plan, #close_run, #delete_case, #get_case, #get_cases, #get_milestone, #get_milestones, #get_plan, #get_plans, #get_project, #get_projects, #get_run, #get_runs, #get_section, #get_sections, #get_suite, #get_suites, #get_test, #get_tests, #update_case
Constructor Details
#initialize(base_url) ⇒ APIClient
Returns a new instance of APIClient.
24 25 26 27 28 29 |
# File 'lib/testrail-ruby.rb', line 24 def initialize(base_url) if !base_url.match(/\/$/) base_url += '/' end @url = base_url + 'index.php?/api/v2/' end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
22 23 24 |
# File 'lib/testrail-ruby.rb', line 22 def password @password end |
#user ⇒ Object
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, data) ⇒ Object
32 33 34 |
# File 'lib/testrail-ruby.rb', line 32 def send_get(uri, data) _send_request('GET', uri, data) end |
#send_post(uri, data) ⇒ Object
37 38 39 |
# File 'lib/testrail-ruby.rb', line 37 def send_post(uri, data) _send_request('POST', uri, data) end |