Class: Backlog::Client
Constant Summary collapse
- BACKLOG_API =
"https://%s:%s@%s.backlog.jp/XML-RPC"
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#space ⇒ Object
readonly
Returns the value of attribute space.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #call(method, args = nil) ⇒ Object
-
#initialize(space, username, password) ⇒ Client
constructor
A new instance of Client.
Methods included from API
#conv_str_to_int, #count_issue, #get_activity_types, #get_comments, #get_components, #get_custom_fields, #get_issue, #get_issue_types, #get_priorities, #get_project, #get_projects, #get_resolutions, #get_statuses, #get_timeline, #get_user, #get_user_icon, #get_users, #get_versions
Constructor Details
#initialize(space, username, password) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 |
# File 'lib/backlog/client.rb', line 11 def initialize(space, username, password) @space = space @username = username @password = password @client = XMLRPC::Client.new2(BACKLOG_API % [@username, @password, @space]) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
17 18 19 |
# File 'lib/backlog/client.rb', line 17 def client @client end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
17 18 19 |
# File 'lib/backlog/client.rb', line 17 def password @password end |
#space ⇒ Object (readonly)
Returns the value of attribute space.
17 18 19 |
# File 'lib/backlog/client.rb', line 17 def space @space end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
17 18 19 |
# File 'lib/backlog/client.rb', line 17 def username @username end |
Instance Method Details
#call(method, args = nil) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/backlog/client.rb', line 19 def call(method, args=nil) if args @client.call(method, args) else @client.call(method) end end |