Sha256: 502b7be9868383fe3d258f0be72dfb8b0d6e2e9fe35dc30d81a56bd34a09c873

Contents?: true

Size: 641 Bytes

Versions: 3

Compression:

Stored size: 641 Bytes

Contents

class Muddyit::Sites::Site::Entities < Muddyit::Generic
  # Placeholder

  # retrieve entities related to the specified entity within the site entities collection
  #
  # Params
  # * options (Optional)
  #
  def find_related(uri, options = {})

    raise if uri.nil?
    api_url = "/sites/#{self.site.attributes[:token]}/entities/#{Digest::MD5.hexdigest(uri)}/related"
    response = @muddyit.send_request(api_url, :get, options)

    results = []
    response.each { |result|
      results.push :count => result.delete('count'), :entity => Muddyit::Sites::Site::Entities::Entity.new(@muddyit, result)
    }
    return results
  end
  
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
monkeyhelper-muddyit_fu-0.2.4 lib/muddyit/sites/entities.rb
muddyit_fu-0.2.8 lib/muddyit/sites/entities.rb
muddyit_fu-0.2.6 lib/muddyit/sites/entities.rb