Module: BacklogKit::Client::Space

Included in:
BacklogKit::Client
Defined in:
lib/backlog_kit/client/space.rb

Overview

Methods for the Space API

Instance Method Summary collapse

Instance Method Details

#download_space_iconBacklogKit::Response

Download a space logo image

Returns:



23
24
25
# File 'lib/backlog_kit/client/space.rb', line 23

def download_space_icon
  get('space/image')
end

#get_spaceBacklogKit::Response

Get a space

Returns:



8
9
10
# File 'lib/backlog_kit/client/space.rb', line 8

def get_space
  get('space')
end

#get_space_activities(params = {}) ⇒ BacklogKit::Response

Get list of space activities

Parameters:

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



16
17
18
# File 'lib/backlog_kit/client/space.rb', line 16

def get_space_activities(params = {})
  get('space/activities', params)
end

#get_space_disk_usageBacklogKit::Response

Get a space disk usage

Returns:



45
46
47
# File 'lib/backlog_kit/client/space.rb', line 45

def get_space_disk_usage
  get('space/diskUsage')
end

#get_space_notificationBacklogKit::Response

Get a space notification

Returns:



30
31
32
# File 'lib/backlog_kit/client/space.rb', line 30

def get_space_notification
  get('space/notification')
end

#update_space_notification(content) ⇒ BacklogKit::Response

Update a space notification

Parameters:

  • content (String)

    Content of the notification

Returns:



38
39
40
# File 'lib/backlog_kit/client/space.rb', line 38

def update_space_notification(content)
  put('space/notification', content: content)
end

#upload_attachment(file_path) ⇒ BacklogKit::Response

Upload attachment file for issue or wiki

Parameters:

  • file_path (String)

    Path of the file

Returns:



53
54
55
56
# File 'lib/backlog_kit/client/space.rb', line 53

def upload_attachment(file_path)
  payload = { file: Faraday::UploadIO.new(file_path, 'application/octet-stream') }
  post('space/attachment', payload)
end