Sha256: ed89c5436d13803d5bfbcea921360372971d05a86b0ec7eb2f56488fe83590da
Contents?: true
Size: 490 Bytes
Versions: 1
Compression:
Stored size: 490 Bytes
Contents
module SimpleHubspot class ApiClient class << self def do_post(path = nil, params = {}, headers = {}) response = RestClient.post "#{SimpleHubspot.configuration.api_base}#{path}#{add_apikey}", params.to_json, { content_type: :json } json = JSON.parse(response.body, symbolize_names: true) json.merge(success: true) end private def add_apikey "?hapikey=#{SimpleHubspot.configuration.hapikey}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_hubspot-0.1.1 | lib/simple_hubspot/api_client.rb |