Skip to content

Commit

Permalink
ability to create a favorite listing
Browse files Browse the repository at this point in the history
  • Loading branch information
rogsmith committed Aug 31, 2012
1 parent ab0ee36 commit be29454
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/etsy/favorite_listing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ class FavoriteListing

attributes :user_id, :listing_state, :listing_id, :create_date

#Create a new favorite listing
#
def self.create(user listing, options = {})
options.merge!(:require_secure => true)
post("/users/#{user.id}/favorites/listings/#{listing.id}", options)
end

#Find all listings favorited by a user
#
def self.find_all_by_user_id(user_id, options = {})
Expand Down

0 comments on commit be29454

Please sign in to comment.