Class: Bugzilla::XMLRPC

Inherits:
Object
  • Object
show all
Defined in:
lib/bugzilla.rb

Overview

Bugzilla::XMLRPC

Instance Method Summary collapse

Constructor Details

#initialize(host, port = 443, path = '/xmlrpc.cgi') ⇒ XMLRPC

Bugzilla::XMLRPC#new(host, port = 443, path = ‘/xmlrpc.cgi’)



106
107
108
109
110
# File 'lib/bugzilla.rb', line 106

def initialize(host, port = 443, path = '/xmlrpc.cgi')
  path ||= '/xmlrpc.cgi'
  use_ssl = port == 443 ? true : false
  @xmlrpc = ::XMLRPC::Client.new(host, path, port, nil, nil, nil, nil, use_ssl, 60)
end

Instance Method Details

#call(cmd, params = {}, user = nil, password = nil) ⇒ Object

Bugzilla::XMLRPC#call(cmd, params, user = nil, password = nil)



118
119
120
121
122
123
# File 'lib/bugzilla.rb', line 118

def call(cmd, params = {}, user = nil, password = nil)
  params = {} if params.nil?
  params['Bugzilla_login'] = user unless user.nil? || password.nil?
  params['Bugzilla_password'] = password unless user.nil? || password.nil?
  @xmlrpc.call(cmd, params)
end

Bugzilla::XMLRPC#cookie



131
132
133
# File 'lib/bugzilla.rb', line 131

def cookie
  @xmlrpc.cookie
end

#cookie=(val) ⇒ Object

Bugzilla::XMLRPC#cookie=(val)



141
142
143
# File 'lib/bugzilla.rb', line 141

def cookie=(val)
  @xmlrpc.cookie = val
end