Class: BacklogKit::Client
- Inherits:
-
Object
- Object
- BacklogKit::Client
- Includes:
- Git, Group, Issue, Notification, Priority, Project, Resolution, Space, Star, Status, User, Wiki
- Defined in:
- lib/backlog_kit/client.rb,
lib/backlog_kit/client/git.rb,
lib/backlog_kit/client/star.rb,
lib/backlog_kit/client/user.rb,
lib/backlog_kit/client/wiki.rb,
lib/backlog_kit/client/group.rb,
lib/backlog_kit/client/issue.rb,
lib/backlog_kit/client/space.rb,
lib/backlog_kit/client/status.rb,
lib/backlog_kit/client/project.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, Issue, Notification, Priority, Project, Resolution, Space, Star, Status, User, Wiki
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 Wiki
#create_wiki, #delete_wiki, #get_wiki, #get_wiki_count, #get_wiki_histories, #get_wiki_shared_files, #get_wiki_stars, #get_wiki_tags, #get_wikis, #link_wiki_shared_files, #unlink_wiki_shared_file, #update_wiki
Methods included from User
#create_user, #delete_user, #download_user_icon, #get_myself, #get_recently_viewed_issues, #get_recently_viewed_projects, #get_recently_viewed_wikis, #get_user, #get_user_activities, #get_user_star_count, #get_user_stars, #get_users, #update_user
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 Project
#add_category, #add_issue_type, #add_project_admin_auth, #add_project_user, #add_version, #add_webhook, #create_project, #delete_project, #download_project_icon, #download_shared_file, #get_categories, #get_issue_types, #get_project, #get_project_activities, #get_project_administrators, #get_project_disk_usage, #get_project_users, #get_projects, #get_shared_files, #get_versions, #get_webhook, #get_webhooks, #remove_category, #remove_issue_type, #remove_project_admin_auth, #remove_project_user, #remove_version, #remove_webhook, #update_category, #update_issue_type, #update_project, #update_version, #update_webhook
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 Issue
#add_comment, #add_comment_notification, #create_issue, #delete_issue, #download_issue_attachment, #get_comment, #get_comment_count, #get_comment_notifications, #get_comments, #get_issue, #get_issue_attachments, #get_issue_count, #get_issue_shared_files, #get_issues, #link_issue_shared_files, #remove_issue_attachment, #unlink_issue_shared_file, #update_comment, #update_issue
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.
39 40 41 42 43 44 45 46 |
# File 'lib/backlog_kit/client.rb', line 39 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.
37 38 39 |
# File 'lib/backlog_kit/client.rb', line 37 def api_key @api_key end |
#space_id ⇒ Object
Returns the value of attribute space_id.
37 38 39 |
# File 'lib/backlog_kit/client.rb', line 37 def space_id @space_id end |
Instance Method Details
#delete(path, params = {}) ⇒ Object
64 65 66 |
# File 'lib/backlog_kit/client.rb', line 64 def delete(path, params = {}) request(:delete, path, params) end |
#get(path, params = {}) ⇒ Object
48 49 50 |
# File 'lib/backlog_kit/client.rb', line 48 def get(path, params = {}) request(:get, path, params) end |
#patch(path, params = {}) ⇒ Object
60 61 62 |
# File 'lib/backlog_kit/client.rb', line 60 def patch(path, params = {}) request(:patch, path, params) end |
#post(path, params = {}) ⇒ Object
52 53 54 |
# File 'lib/backlog_kit/client.rb', line 52 def post(path, params = {}) request(:post, path, params) end |
#put(path, params = {}) ⇒ Object
56 57 58 |
# File 'lib/backlog_kit/client.rb', line 56 def put(path, params = {}) request(:put, path, params) end |