class Quickmail::Authentication
Public Class Methods
oauth(payload = {})
click to toggle source
# File lib/quickmail/authentication.rb, line 7 def oauth(payload = {}) RestClient::Request.new({ method: :post, url: Quickmail.api_base + 'token', payload: payload, headers: {content_type: "application/x-www-form-urlencoded"} }).execute do |response, request, result| str_response = response.to_str str_response.blank? ? '' : JSON.parse(str_response) end end