Sha256: 58fb8bfc54f4dd7c73e479c161bf67d465dc99e38b126838b78f87ed437564ba

Contents?: true

Size: 631 Bytes

Versions: 6

Compression:

Stored size: 631 Bytes

Contents

class Muddyit::Collections::Collection < Muddyit::Generic

  # get pages object for collection
  #
  def pages() @pages ||= Muddyit::Collections::Collection::Pages.new(@muddyit, :collection => self) end
  def entities() @entities ||= Muddyit::Collections::Collection::Entities.new(@muddyit, :collection => self) end

  def destroy
    api_url = "/collections/#{@attributes[:token]}"
    @muddyit.send_request(api_url, :delete, {})
  end

  protected
  def fetch
    api_url = "/collections/#{@attributes[:token]}"
    response = @muddyit.send_request(api_url, :get, {})
    response['collections'].nested_symbolize_keys!
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
muddyit_fu-0.2.14 lib/muddyit/collections/collection.rb
muddyit_fu-0.2.13 lib/muddyit/collections/collection.rb
muddyit_fu-0.2.12 lib/muddyit/collections/collection.rb
muddyit_fu-0.2.11 lib/muddyit/collections/collection.rb
muddyit_fu-0.2.10 lib/muddyit/collections/collection.rb
muddyit_fu-0.2.9 lib/muddyit/collections/collection.rb