Sha256: b682662debf13ce8492e005027b750a98c189ce20a1d0686f019a82816ba1c06

Contents?: true

Size: 586 Bytes

Versions: 7

Compression:

Stored size: 586 Bytes

Contents

module Zype
  # Read more at https://docs.zype.com/v1.0/reference#video-entitlements
  #
  # @since 0.15.0
  class VideoEntitlements < Zype::Base::Consumers
    # Checks if the consumer is entitled to watch the video
    #
    # @param video_id [String] ID of the video
    # @param access_token [String] Access token used to identify the consumer
    # @return Hash
    def entitled(video_id:, access_token:)
      client.execute(method: :get, path: "/videos/#{video_id}/entitled", params: { access_token: access_token })
    end

    def path
      @path = 'videos'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
zype-0.20.0 lib/zype/models/video_entitlements.rb
zype-0.19.0 lib/zype/models/video_entitlements.rb
zype-0.18.0 lib/zype/models/video_entitlements.rb
zype-0.17.0 lib/zype/models/video_entitlements.rb
zype-0.16.1 lib/zype/models/video_entitlements.rb
zype-0.16.0 lib/zype/models/video_entitlements.rb
zype-0.15.0 lib/zype/models/video_entitlements.rb