Module: Request
- Included in:
- Telegraph
- Defined in:
- lib/request.rb
Instance Method Summary collapse
Instance Method Details
#post(method, body) ⇒ Object
4 5 6 7 8 |
# File 'lib/request.rb', line 4 def post(method, body) data = HTTParty.post("https://api.telegra.ph/#{method}", body: body).parsed_response return data['result'] if data['result'] data end |