Class: RubyDuga::Client
- Inherits:
-
Object
- Object
- RubyDuga::Client
- Defined in:
- lib/ruby_duga/client.rb
Constant Summary collapse
- BASE_URL =
"http://affapi.duga.jp/".freeze
- DEFAULT_AGENT_ID =
"40413".freeze
- DEFAULT_BANNER_ID =
"01".freeze
- API_VERSION =
"1.2".freeze
- API_MAP =
{ search: "search" }.freeze
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
12 13 14 15 16 |
# File 'lib/ruby_duga/client.rb', line 12 def initialize( = {}) @appid = (ENV["DUGA_APP_ID"] || [:app_id]) @agentid = (ENV["DUGA_AGENT_ID"] || [:agent_id] || DEFAULT_AGENT_ID) @bannerid = (ENV["DUGA_BANNER_AGENT"] || [:banner_id] || DEFAULT_BANNER_ID) end |