Class: Wordsmith::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/wordsmith/client.rb

Instance Method Summary collapse

Instance Method Details

#get(uri) ⇒ Object



8
9
10
11
# File 'lib/wordsmith/client.rb', line 8

def get(uri)
  response = connection.get uri
  parse_response response
end

#post(uri, data) ⇒ Object



13
14
15
16
# File 'lib/wordsmith/client.rb', line 13

def post(uri, data)
  response = connection.post uri, {data: data}.to_json
  parse_response response
end