lib/spark_api/response.rb in spark_api-1.4.18 vs lib/spark_api/response.rb in spark_api-1.4.19

- old
+ new

@@ -1,9 +1,9 @@ module SparkApi # API Response interface module Response - ATTRIBUTES = [:code, :message, :results, :success, :pagination, :details, :d] + ATTRIBUTES = [:code, :message, :results, :success, :pagination, :details, :d, :errors, :sparkql_errors] attr_accessor *ATTRIBUTES def success? @success end end @@ -21,9 +21,11 @@ self.code = self.d["Code"] self.results = Array(self.d["Results"]) self.success = self.d["Success"] self.pagination = self.d["Pagination"] self.details = self.d["Details"] || [] + self.errors = self.d["Errors"] + self.sparkql_errors = self.d['SparkQLErrors'] super(results) rescue Exception => e SparkApi.logger.error "Unable to understand the response! #{d}" raise end