lib/unsplash/photo.rb in unsplash-1.5.1 vs lib/unsplash/photo.rb in unsplash-1.5.2

- old
+ new

@@ -15,9 +15,15 @@ def unlike! connection.delete("/photos/#{id}/like") true end + # Download a photo. + # @return [String] URL of image file for download. + def download! + connection.get(links.download_location)["url"] + end + class << self # Get a photo. Can be cropped or resized using the optional parameters. # @param id [String] The ID of the photo to retrieve. # @param width [Integer] Width of customized version of the photo.