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:



25
26
27
# File 'lib/backlog_kit/client/space.rb', line 25

def download_space_icon
  get('space/image')
end

#get_spaceBacklogKit::Response

Get a space

Returns:



10
11
12
# File 'lib/backlog_kit/client/space.rb', line 10

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:



18
19
20
# File 'lib/backlog_kit/client/space.rb', line 18

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

#get_space_disk_usageBacklogKit::Response

Get a space disk usage

Returns:



47
48
49
# File 'lib/backlog_kit/client/space.rb', line 47

def get_space_disk_usage
  get('space/diskUsage')
end

#get_space_notificationBacklogKit::Response

Get a space notification

Returns:



32
33
34
# File 'lib/backlog_kit/client/space.rb', line 32

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:



40
41
42
# File 'lib/backlog_kit/client/space.rb', line 40

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:



55
56
57
58
# File 'lib/backlog_kit/client/space.rb', line 55

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