Class: Testrail::APIClient
- Inherits:
-
Object
- Object
- Testrail::APIClient
- Defined in:
- lib/tagrail/client.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) ⇒ Object
- #send_post(uri, data) ⇒ Object
Constructor Details
#initialize(base_url) ⇒ APIClient
Returns a new instance of APIClient.
60 61 62 63 64 65 |
# File 'lib/tagrail/client.rb', line 60 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.
58 59 60 |
# File 'lib/tagrail/client.rb', line 58 def password @password end |
#user ⇒ Object
Returns the value of attribute user.
57 58 59 |
# File 'lib/tagrail/client.rb', line 57 def user @user end |
Instance Method Details
#send_get(uri) ⇒ Object
67 68 69 |
# File 'lib/tagrail/client.rb', line 67 def send_get(uri) _send_request('GET', uri, nil) end |
#send_post(uri, data) ⇒ Object
71 72 73 |
# File 'lib/tagrail/client.rb', line 71 def send_post(uri, data) _send_request('POST', uri, data) end |