lib/muddyit/sites/entities.rb in monkeyhelper-muddyit_fu-0.2.2 vs lib/muddyit/sites/entities.rb in monkeyhelper-muddyit_fu-0.2.3

- old
+ new

@@ -1,15 +1,16 @@ -class Muddyit::Sites::Site::Entities +class Muddyit::Sites::Site::Entities < Muddyit::Generic # Placeholder # retrieve entities related to the specified entity within the site entities collection # # Params # * options (Optional) # - def related(uri, options = {}) + def find_related(uri, options = {}) + raise if uri.nil? - api_url = "/sites/#{self.site.attributes[:token]}/entities/#{Digest::MD5.hexdigest(URI.encode(uri))}/related" + 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| # The return format needs sorting out here .......