Class: Talkable::API::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/talkable/api/base.rb

Direct Known Subclasses

Campaign, Coupon, Metric, Offer, Origin, Person, Referral, Reward, Share, Visitor

Class Method Summary collapse

Class Method Details

.get(path, params = {}) ⇒ Object



9
10
11
12
13
# File 'lib/talkable/api/base.rb', line 9

def get(path, params = {})
  uri = request_uri(path, request_params(params))
  request = Net::HTTP::Get.new(uri.request_uri)
  perform_request(uri, request)
end

.post(path, params = {}) ⇒ Object



15
16
17
# File 'lib/talkable/api/base.rb', line 15

def post(path, params = {})
  data_request(:post, path, params)
end

.put(path, params = {}) ⇒ Object



19
20
21
# File 'lib/talkable/api/base.rb', line 19

def put(path, params = {})
  data_request(:put, path, params)
end