mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
33 lines
852 B
Ruby
33 lines
852 B
Ruby
require 'fog/core/collection'
|
|
require 'fog/aws/models/cdn/streaming_distribution'
|
|
require 'fog/aws/models/cdn/distributions_helper'
|
|
|
|
module Fog
|
|
module CDN
|
|
class AWS
|
|
|
|
class StreamingDistributions < Fog::Collection
|
|
include Fog::CDN::AWS::DistributionsHelper
|
|
|
|
model Fog::CDN::AWS::StreamingDistribution
|
|
|
|
attribute :marker, :aliases => 'Marker'
|
|
attribute :max_items, :aliases => 'MaxItems'
|
|
attribute :is_truncated, :aliases => 'IsTruncated'
|
|
|
|
def get_distribution(dist_id)
|
|
service.get_streaming_distribution(dist_id)
|
|
end
|
|
|
|
def list_distributions(options = {})
|
|
service.get_streaming_distribution_list(options)
|
|
end
|
|
|
|
alias_method :each_distribution_this_page, :each
|
|
alias_method :each, :each_distribution
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|