Class: Rodzilla::WebService
- Inherits:
-
Object
- Object
- Rodzilla::WebService
- Defined in:
- lib/rodzilla/web_service.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#format ⇒ Object
Returns the value of attribute format.
-
#options ⇒ Object
Returns the value of attribute options.
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
-
#bugs ⇒ Object
Provide a shortcut for instantiation Bug objects.
-
#bugzilla ⇒ Object
Provide a shortcut for instantiation Bugzilla objects.
-
#classifications ⇒ Object
Provide a shortcut for instantiation Classification objects.
-
#groups ⇒ Object
Provide a shortcut for instantiation Group objects.
-
#initialize(base_url, username, password, format = :json, options = {}) ⇒ WebService
constructor
base_url - The String full uri of the Bugzilla api server username - The String containing the bugzilla authorized users username password - The String containing the bugzilla authorized users password format - The request/response format which defaults to :json.
-
#products ⇒ Object
Provide a shortcut for instantiation Product objects.
-
#users ⇒ Object
Provide a shortcut for instantiation User objects.
Constructor Details
#initialize(base_url, username, password, format = :json, options = {}) ⇒ WebService
base_url - The String full uri of the Bugzilla api server username - The String containing the bugzilla authorized users username password - The String containing the bugzilla authorized users password format - The request/response format which defaults to :json
10 11 12 13 14 15 16 |
# File 'lib/rodzilla/web_service.rb', line 10 def initialize(base_url, username, password, format=:json, ={}) @base_url = base_url @username = username @password = password @format = format @options = || {} end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
4 5 6 |
# File 'lib/rodzilla/web_service.rb', line 4 def base_url @base_url end |
#format ⇒ Object
Returns the value of attribute format.
4 5 6 |
# File 'lib/rodzilla/web_service.rb', line 4 def format @format end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/rodzilla/web_service.rb', line 4 def @options end |
#resource ⇒ Object
Returns the value of attribute resource.
4 5 6 |
# File 'lib/rodzilla/web_service.rb', line 4 def resource @resource end |
Instance Method Details
#bugs ⇒ Object
Provide a shortcut for instantiation Bug objects
Returns an instance of the Rodzilla::Resource::Bug class
21 22 23 |
# File 'lib/rodzilla/web_service.rb', line 21 def bugs bugzilla_resource('Bug') end |
#bugzilla ⇒ Object
Provide a shortcut for instantiation Bugzilla objects
Returns an instance of the Rodzilla::Resource::Bugzilla class
28 29 30 |
# File 'lib/rodzilla/web_service.rb', line 28 def bugzilla bugzilla_resource('Bugzilla') end |
#classifications ⇒ Object
Provide a shortcut for instantiation Classification objects
Returns an instance of the Rodzilla::Resource::Classification class
35 36 37 |
# File 'lib/rodzilla/web_service.rb', line 35 def classifications bugzilla_resource('Classification') end |
#groups ⇒ Object
Provide a shortcut for instantiation Group objects
Returns an instance of the Rodzilla::Resource::Group class
42 43 44 |
# File 'lib/rodzilla/web_service.rb', line 42 def groups bugzilla_resource('Group') end |
#products ⇒ Object
Provide a shortcut for instantiation Product objects
Returns an instance of the Rodzilla::Resource::Product class
49 50 51 |
# File 'lib/rodzilla/web_service.rb', line 49 def products bugzilla_resource('Product') end |
#users ⇒ Object
Provide a shortcut for instantiation User objects
Returns an instance of the Rodzilla::Resource::User class
56 57 58 |
# File 'lib/rodzilla/web_service.rb', line 56 def users bugzilla_resource('User') end |