lib/storenvy/client.rb in storenvy-0.0.1 vs lib/storenvy/client.rb in storenvy-0.0.2

- old
+ new

@@ -6,23 +6,25 @@ class Client include HTTParty headers 'Content-Type' => 'application/json' - def initialize(options={}) - end + def initialize(options={}) + end def self.fetch(path) response = get(path) Hashie::Mash.new(response) end def self.list(path, opts={}) response = get(path, :query => {'limit' => opts[:limit]}) - response.map { |c| Hashie::Mash.new(c)} + response.map { |c| Hashie::Mash.new(c) } end - + def store(subdomain, opts={}) + store = self.class.fetch("http://#{subdomain}.storenvy.com/store.json") + end ############################################## ## HELPERS private