class Rubyfuri::YahooAPI

Constants

API_PATH
BASE_URL

Public Class Methods

request(app_id, text) click to toggle source
# File lib/rubyfuri/yahoo_api.rb, line 9
def request(app_id, text)
  res = http_client.get do |req|
    req.url API_PATH
    req.params[:appid] = app_id
    req.params[:sentence] = text
  end
end

Private Class Methods

http_client() click to toggle source
# File lib/rubyfuri/yahoo_api.rb, line 19
def http_client
  conn ||= Faraday.new(:url => BASE_URL) do |faraday|
    faraday.request  :url_encoded
    # faraday.response :logger
    faraday.adapter  Faraday.default_adapter
  end
end