lib/unsplash/client.rb in unsplash-1.4.1 vs lib/unsplash/client.rb in unsplash-1.4.2
- old
+ new
@@ -19,10 +19,16 @@
else
raise Unsplash::Error.new "Missing self link for #{self.class} with ID #{self.id}"
end
end
+ # Raw JSON as returned by Unsplash API.
+ # @return [Hash] json
+ def to_h
+ @attributes.to_h
+ end
+
# @private
def method_missing(method, *args, &block)
attribute = @attributes.send(method, *args, &block)
attribute.is_a?(Hash) ? Client.new(attribute) : attribute
end
@@ -46,6 +52,6 @@
def connection=(conn)
@@connection = conn
end
end
end
-end
\ No newline at end of file
+end