Sha256: a2fa6b9fd2761047f8f109962a5ad492d34e8f1dc7b0206bfd5819e0becb7523

Contents?: true

Size: 428 Bytes

Versions: 1

Compression:

Stored size: 428 Bytes

Contents

module Mousetrap
  class Resource
    include HTTParty
    headers 'User-Agent' => 'Mousetrap Ruby Client'
    base_uri 'https://cheddargetter.com'

    def self.get_resources(resource)
      get "/xml/#{resource}/get/productCode/#{Mousetrap.product_code}"
    end

    def self.post_resource(resource, action, hash)
      post "/xml/#{resource}/#{action}/productCode/#{Mousetrap.product_code}", :body => hash
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hashrocket-mousetrap-0.1.1 lib/mousetrap/resource.rb