Class: EventBright::API

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/eventbright/main.rb

Class Method Summary collapse

Class Method Details

.do_post(function, opts = {}) ⇒ Object


49
50
51
52
53
54
55
# File 'lib/eventbright/main.rb', line 49

def self.do_post(function, opts = {})
  response = post(function, opts)
  if response["error"]
    raise Error.new(response["error"]["error_message"], response["error"]["error_type"], response)
  end
  response
end