Sha256: 7ae2817b24458aa105d37b39ada2520c371ed2bb04c7860920f8626a0288113a

Contents?: true

Size: 640 Bytes

Versions: 3

Compression:

Stored size: 640 Bytes

Contents

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

  # retrieve entities related to the specified entity within the site entities collection
  #
  # Params
  # * options (Optional)
  #
  def related(uri, options = {})
    raise if uri.nil?
    api_url = "/sites/#{self.site.attributes[:token]}/entities/#{Digest::MD5.hexdigest(URI.encode(uri))}/related"
    response = @muddyit.send_request(api_url, :get, options)

    results = []
    response.each { |result|
      # The return format needs sorting out here .......
      results.push Muddyit::Sites::Site::Entities::Entity.new(@muddyit, result)
    }
    return results
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
monkeyhelper-muddyit_fu-0.2.0 lib/muddyit/sites/entities.rb
monkeyhelper-muddyit_fu-0.2.1 lib/muddyit/sites/entities.rb
monkeyhelper-muddyit_fu-0.2.2 lib/muddyit/sites/entities.rb