Sha256: 060581952bbafee85117d3ee7197233cc41e652ab3a6f52d5f22eec2a9bb462a

Contents?: true

Size: 1.62 KB

Versions: 6

Compression:

Stored size: 1.62 KB

Contents

module BacklogKit
  class Client
    # Methods for the Space API
    module Space
      # Get a space
      #
      # @return [BacklogKit::Response] The space information
      def get_space
        get('space')
      end

      # Get list of space activities
      #
      # @param params [Hash] Request parameters
      # @return [BacklogKit::Response] List of recent updates in your space
      def get_space_activities(params = {})
        get('space/activities', params)
      end

      # Download a space logo image
      #
      # @return [BacklogKit::Response] Binary image data
      def download_space_icon
        get('space/image')
      end

      # Get a space notification
      #
      # @return [BacklogKit::Response] The notification information
      def get_space_notification
        get('space/notification')
      end

      # Update a space notification
      #
      # @param content [String] Content of the notification
      # @return [BacklogKit::Response] The notification information
      def update_space_notification(content)
        put('space/notification', content: content)
      end

      # Get a space disk usage
      #
      # @return [BacklogKit::Response] The disk usage
      def get_space_disk_usage
        get('space/diskUsage')
      end

      # Upload attachment file for issue or wiki
      #
      # @param file_path [String] Path of the file
      # @return [BacklogKit::Response] The file information
      def upload_attachment(file_path)
        payload = { file: Faraday::UploadIO.new(file_path, 'application/octet-stream') }
        post('space/attachment', payload)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
backlog_kit-0.19.0 lib/backlog_kit/client/space.rb
backlog_kit-0.18.0 lib/backlog_kit/client/space.rb
backlog_kit-0.17.0 lib/backlog_kit/client/space.rb
backlog_kit-0.16.0 lib/backlog_kit/client/space.rb
backlog_kit-0.15.0 lib/backlog_kit/client/space.rb
backlog_kit-0.14.0 lib/backlog_kit/client/space.rb