Class: BambooApi
- Inherits:
-
Object
- Object
- BambooApi
- Defined in:
- lib/bamboo_api.rb,
lib/bamboo_api/version.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Build, Plan, Project, Stage
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BambooApi
constructor
A new instance of BambooApi.
Constructor Details
#initialize(options = {}) ⇒ BambooApi
Returns a new instance of BambooApi.
13 14 15 16 17 |
# File 'lib/bamboo_api.rb', line 13 def initialize ={} @@end_point = [ :end_point ] @@username = [ :username ] @@password = [ :password ] end |
Class Method Details
.compose_url(action, expand = nil) ⇒ Object
19 20 21 22 23 |
# File 'lib/bamboo_api.rb', line 19 def self.compose_url action, =nil url = "https://#{@@end_point}/builds/rest/api/latest/#{action}.json?os_authType=basic&os_username=#{URI::encode( @@username )}&os_password=#{URI::encode( @@password )}" url += "&expand=#{}" url end |
.request(action, expand = nil) ⇒ Object
25 26 27 |
# File 'lib/bamboo_api.rb', line 25 def self.request action, =nil JSON.parse( RestClient.get( BambooApi.compose_url( action, ) ) ) end |