def set_relationships(module_names, module_ids, link_field_names, related_ids)
    login! unless logged_in?
    
    [module_names, module_ids, link_field_names, related_ids].each do |arg|
      raise ArgumentError, "argument must be an Array" unless arg.class == Array
    end
    
    json = <<-EOF
      {
        "session": "#{@sugar_session_id}",
        "module_names": "#{module_names.to_json}",
        "module_ids": #{module_ids.to_json},
        "link_field_names": #{link_field_names.to_json},
        "related_ids": #{related_ids.to_json}   
      }
    EOF
    json.gsub!(/^\s{6}/,'')
    send!(:set_relationships, json)
  end
def set_relationships(module_names, module_ids, link_field_names, related_ids)
    login! unless logged_in?
    
    [module_names, module_ids, link_field_names, related_ids].each do |arg|
      raise ArgumentError, "argument must be an Array" unless arg.class == Array
    end
    
    json = <<-EOF
      {
        "session": "#{@sugar_session_id}",
        "module_names": "#{module_names.to_json}",
        "module_ids": #{module_ids.to_json},
        "link_field_names": #{link_field_names.to_json},
        "related_ids": #{related_ids.to_json}   
      }
    EOF
    json.gsub!(/^\s{6}/,'')
    send!(:set_relationships, json)
  end
Sets multiple relationships between two SugarBeans.