kastner (owner)

Revisions

gist: 184015 Download_button fork
public
Public Clone URL: git://gist.github.com/184015.git
Embed All Files: show embed
etsy.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'httparty'
 
class Etsy
  include HTTParty
  format :json
  base_uri "http://beta-api.etsy.com/v1/"
 
  def self.api_key=(key)
    default_params :api_key => key
  end
end
 
class Listing < Etsy
  def self.find_by_id(listing_id)
    get("/listings/#{listing_id}")["results"][0]
  end
end