Module: Yadokari::Api

Included in:
Me, Reserve, Schedule, Yado
Defined in:
lib/yadokari/api.rb

Constant Summary collapse

END_POINT =
'https://yado-kari.herokuapp.com'.freeze
API_ENTRY_POINT =
'/api/v1'.freeze

Instance Method Summary collapse

Instance Method Details

#do_get(path) ⇒ Object



14
15
16
17
# File 'lib/yadokari/api.rb', line 14

def do_get(path)
  res = client.get entry_path(path)
  JSON.parse res.body
end

#do_post(path, params) ⇒ Object



9
10
11
12
# File 'lib/yadokari/api.rb', line 9

def do_post(path, params)
  res = client.post entry_path(path), params
  JSON.parse res.body
end