Sha256: 0cfe7f79b0c3a3a755f820cde8bf8bdee1eef1c60a606d406c2a38d3c35529dd

Contents?: true

Size: 1.65 KB

Versions: 6

Compression:

Stored size: 1.65 KB

Contents

require 'smartsheet/endpoints/share/share'

module Smartsheet
  # Report Sharing Endpoints
  # @see https://smartsheet-platform.github.io/api-docs/?ruby#report-sharing API Report Sharing Docs
  class ReportsShare
    attr_reader :client
    private :client

    URL = ['reports', :report_id].freeze

    def initialize(client)
      @client = client
    end

    def delete(report_id:, share_id:, params: {}, header_overrides: {})
      delete_share(
          share_id: share_id,
          url: URL,
          params: params,
          header_overrides: header_overrides,
          report_id: report_id
      )
    end

    def get(report_id:, share_id:, params: {}, header_overrides: {})
      get_share(
          share_id: share_id,
          url: URL,
          params: params,
          header_overrides: header_overrides,
          report_id: report_id
      )
    end

    def list(report_id:, params: {}, header_overrides: {})
      list_share(
          url: URL,
          header_overrides: header_overrides,
          params: params,
          report_id: report_id
      )
    end

    def create(report_id:, body:, params: {}, header_overrides: {})
      create_share(
          url: URL,
          header_overrides: header_overrides,
          params: params,
          body: body,
          report_id: report_id
      )
    end

    def update(report_id:, share_id:, body:, params: {}, header_overrides: {})
      update_share(
          share_id: share_id,
          url: URL,
          params: params,
          header_overrides: header_overrides,
          body: body,
          report_id: report_id
      )
    end

    private

    include Smartsheet::Share
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
smartsheet-2.101.1 lib/smartsheet/endpoints/reports/reports_share.rb
smartsheet-2.101.0 lib/smartsheet/endpoints/reports/reports_share.rb
smartsheet-2.86.1 lib/smartsheet/endpoints/reports/reports_share.rb
smartsheet-2.86.0 lib/smartsheet/endpoints/reports/reports_share.rb
smartsheet-2.77.2 lib/smartsheet/endpoints/reports/reports_share.rb
smartsheet-1.0.0 lib/smartsheet/endpoints/reports/reports_share.rb