Class: TestlinkAPIClient
- Inherits:
-
Object
- Object
- TestlinkAPIClient
- Defined in:
- lib/testlink/client/tl-api-cli.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #get_api_url(url) ⇒ Object
- #get_latest_build_for_test_plan(tplanid) ⇒ Object
-
#initialize(url, key) ⇒ TestlinkAPIClient
constructor
A new instance of TestlinkAPIClient.
Constructor Details
#initialize(url, key) ⇒ TestlinkAPIClient
Returns a new instance of TestlinkAPIClient.
7 8 9 10 |
# File 'lib/testlink/client/tl-api-cli.rb', line 7 def initialize url, key @key = key @url = get_api_url url end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/testlink/client/tl-api-cli.rb', line 5 def key @key end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/testlink/client/tl-api-cli.rb', line 5 def url @url end |
Instance Method Details
#get_api_url(url) ⇒ Object
13 14 15 |
# File 'lib/testlink/client/tl-api-cli.rb', line 13 def get_api_url url url + "/lib/api/xmlrpc/v1/xmlrpc.php" end |
#get_latest_build_for_test_plan(tplanid) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/testlink/client/tl-api-cli.rb', line 18 def get_latest_build_for_test_plan tplanid connection = XMLRPC::Client.new_from_url @url input = { "devKey" => @key,"tplanid" => tplanid } result = connection.call2 "getLatestBuildForPlan", input puts result end |