Skip to content

Commit

Permalink
Enable fetching of images by image id.
Browse files Browse the repository at this point in the history
  • Loading branch information
Muon committed Feb 27, 2012
1 parent aa546c6 commit 3c58d14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/etsy/image.rb
Expand Up @@ -19,6 +19,12 @@ class Image
attribute :thumbnail, :from => :url_570xN
attribute :full, :from => :url_fullxfull

# Fetch an image by id for a given listing.
#
def self.find_by_listing_id_and_image_id(listing_id, *identifiers_and_options)
find_one_or_more("listings/#{listing_id}/images", identifiers_and_options)
end

# Fetch all images for a given listing.
#
def self.find_all_by_listing_id(listing_id)
Expand Down

0 comments on commit 3c58d14

Please sign in to comment.