lib/google_apps/transport.rb in google_apps-0.3.5 vs lib/google_apps/transport.rb in google_apps-0.3.6

- old
+ new

@@ -115,11 +115,12 @@ # endpoint and an id as arguments. # # get 'endpoint', 'username' # # get returns the HTTP response received from Google. - def get(endpoint, id) - uri = URI(instance_variable_get("@#{endpoint.to_s}") + "/#{id}") + def get(endpoint, id = nil) + id ? uri = URI(instance_variable_get("@#{endpoint.to_s}") + "/#{id}") : uri = URI(instance_variable_get("@#{endpoint.to_s}")) + #uri = URI(instance_variable_get("@#{endpoint.to_s}") + "/#{id}") @request = Net::HTTP::Get.new(uri.path) set_headers :user @response = request(uri) end \ No newline at end of file