Class: Giphy::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/giphy/request.rb

Constant Summary collapse

URL =
'http://api.giphy.com'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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



9
10
11
# File 'lib/giphy/request.rb', line 9

def self.get(path, options={})
  new.get(path, options)
end

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



13
14
15
# File 'lib/giphy/request.rb', line 13

def self.post(path, options={})
  new.post(path, options)
end

Instance Method Details

#get(path, options = {}) ⇒ Object



17
18
19
# File 'lib/giphy/request.rb', line 17

def get(path, options={})
  connection.get(complete_path(path), complete_options(options))
end

#post(path, options = {}) ⇒ Object



21
22
23
# File 'lib/giphy/request.rb', line 21

def post(path, options={})
  connection.post(complete_path(path), complete_options(options))
end