Module: CodePicnic::APIRequest

Included in:
Console
Defined in:
lib/codepicnic/api_request.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object


3
4
5
# File 'lib/codepicnic/api_request.rb', line 3

def self.included(klass)
  klass.extend ClassMethods
end

Instance Method Details

#get(url) ⇒ Object


11
12
13
# File 'lib/codepicnic/api_request.rb', line 11

def get(url)
  self.class.get(url)
end

#post(url, params = {}) ⇒ Object


15
16
17
# File 'lib/codepicnic/api_request.rb', line 15

def post(url, params = {})
  self.class.post(url, params)
end

#post_form(url, params = {}) ⇒ Object


19
20
21
# File 'lib/codepicnic/api_request.rb', line 19

def post_form(url, params = {})
  self.class.post_form(url, params)
end

#url_to(container_name = nil, verb = nil) ⇒ Object


7
8
9
# File 'lib/codepicnic/api_request.rb', line 7

def url_to(container_name = nil, verb = nil)
  self.class.url_to(container_name, verb)
end