Sha256: 838baaa616f320a281ba87706ee66c6f48e7e0e1814a45df684b574b99f595ac

Contents?: true

Size: 799 Bytes

Versions: 2

Compression:

Stored size: 799 Bytes

Contents

module BacklogApiClient
  class Client
    class Space
      RESOURCE_NAME = 'space'

      def initialize(client)
        @client = client
      end

      def information
        @client.get(RESOURCE_NAME)
      end

      def activities(request = {})
        @client.get("#{RESOURCE_NAME}/activities", request)
      end

      def image
        @client.get("#{RESOURCE_NAME}/image")
      end

      def notification
        @client.get("#{RESOURCE_NAME}/notification")
      end

      def update_notification(content)
        @client.put("#{RESOURCE_NAME}/notification", content)
      end

      def disk_usage
        @client.get("#{RESOURCE_NAME}/diskUsage")
      end

      def attachment(file)
        @client.file_upload("#{RESOURCE_NAME}/attachment", file)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
backlog-api-client-0.0.2 lib/backlog-api-client/space.rb
backlog-api-client-0.0.1 lib/backlog-api-client/space.rb