Class: BacklogKit::Client
- Inherits:
-
Object
- Object
- BacklogKit::Client
- Includes:
- Git, Group, Notification, Priority, Resolution, Space, Star, Status
- Defined in:
- lib/backlog_kit/client.rb,
lib/backlog_kit/client/git.rb,
lib/backlog_kit/client/star.rb,
lib/backlog_kit/client/group.rb,
lib/backlog_kit/client/space.rb,
lib/backlog_kit/client/status.rb,
lib/backlog_kit/client/priority.rb,
lib/backlog_kit/client/resolution.rb,
lib/backlog_kit/client/notification.rb
Defined Under Namespace
Modules: Git, Group, Notification, Priority, Resolution, Space, Star, Status
Constant Summary collapse
- USER_AGENT =
"BacklogKit Ruby Gem #{BacklogKit::VERSION}".freeze
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#space_id ⇒ Object
Returns the value of attribute space_id.
Instance Method Summary collapse
- #delete(path, params = {}) ⇒ Object
- #get(path, params = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #patch(path, params = {}) ⇒ Object
- #post(path, params = {}) ⇒ Object
- #put(path, params = {}) ⇒ Object
Methods included from Status
Methods included from Star
#add_issue_comment_star, #add_issue_star, #add_wiki_star
Methods included from Space
#download_space_icon, #get_space, #get_space_activities, #get_space_disk_usage, #get_space_notification, #update_space_notification, #upload_attachment
Methods included from Resolution
Methods included from Priority
Methods included from Notification
#get_notification_count, #get_notifications, #mark_as_read_notification, #reset_already_read_notification_count
Methods included from Group
#create_group, #delete_group, #get_group, #get_groups, #update_group
Methods included from Git
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
31 32 33 34 35 36 37 38 |
# File 'lib/backlog_kit/client.rb', line 31 def initialize( = {}) @space_id = ENV['BACKLOG_SPACE_ID'] @api_key = ENV['BACKLOG_API_KEY'] .each do |key, value| instance_variable_set(:"@#{key}", value) end end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
29 30 31 |
# File 'lib/backlog_kit/client.rb', line 29 def api_key @api_key end |
#space_id ⇒ Object
Returns the value of attribute space_id.
29 30 31 |
# File 'lib/backlog_kit/client.rb', line 29 def space_id @space_id end |
Instance Method Details
#delete(path, params = {}) ⇒ Object
56 57 58 |
# File 'lib/backlog_kit/client.rb', line 56 def delete(path, params = {}) request(:delete, path, params) end |
#get(path, params = {}) ⇒ Object
40 41 42 |
# File 'lib/backlog_kit/client.rb', line 40 def get(path, params = {}) request(:get, path, params) end |
#patch(path, params = {}) ⇒ Object
52 53 54 |
# File 'lib/backlog_kit/client.rb', line 52 def patch(path, params = {}) request(:patch, path, params) end |
#post(path, params = {}) ⇒ Object
44 45 46 |
# File 'lib/backlog_kit/client.rb', line 44 def post(path, params = {}) request(:post, path, params) end |
#put(path, params = {}) ⇒ Object
48 49 50 |
# File 'lib/backlog_kit/client.rb', line 48 def put(path, params = {}) request(:put, path, params) end |