lib/unsplash/user.rb in unsplash-1.1.0 vs lib/unsplash/user.rb in unsplash-1.2.0
- old
+ new
@@ -34,8 +34,16 @@
list.map do |photo|
Unsplash::Photo.new photo.to_hash
end
end
+ # Get a list of photos liked by the user.
+ # @return [Array] a list of +Unsplash::Photo+ objects.
+ def likes
+ list = JSON.parse(connection.get("/users/#{username}/likes").body)
+ list.map do |photo|
+ Unsplash::Photo.new photo.to_hash
+ end
+ end
end
end
\ No newline at end of file