Class: TeamcityRestClient::Authentication
- Inherits:
-
Object
- Object
- TeamcityRestClient::Authentication
show all
- Defined in:
- lib/teamcity-rest-client.rb
Instance Method Summary
collapse
Constructor Details
#initialize(openuri_options) ⇒ Authentication
Returns a new instance of Authentication.
102
103
104
|
# File 'lib/teamcity-rest-client.rb', line 102
def initialize openuri_options
@openuri_options = openuri_options
end
|
Instance Method Details
#get(path, params = {}) ⇒ Object
106
107
108
|
# File 'lib/teamcity-rest-client.rb', line 106
def get path, params = {}
open(url(path, params), @openuri_options).read
end
|
#query_string_for(params) ⇒ Object
110
111
112
113
114
|
# File 'lib/teamcity-rest-client.rb', line 110
def query_string_for params
pairs = []
params.each_pair { |k,v| pairs << "#{k}=#{v}" }
pairs.join("&")
end
|