Sha256: 1174093b0e68e6a6aa89e9cb98f74e3eee805343c4b7f083c94d30b93f61d0bf

Contents?: true

Size: 681 Bytes

Versions: 1

Compression:

Stored size: 681 Bytes

Contents

require 'httparty'
require 'hashie'
    
module Storenvy

  class Client
    
    include HTTParty
    headers 'Content-Type' => 'application/json' 

    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) }
    end	
	
	  def store(subdomain, opts={})
      store = self.class.fetch("http://#{subdomain}.storenvy.com/store.json")
    end
    ##############################################
    ## HELPERS
  private
 
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
storenvy-0.0.2 lib/storenvy/client.rb