Class: DDAPI::App

Inherits:
Object
  • Object
show all
Includes:
Init
Defined in:
lib/dd-api/classes.rb

Overview

A Class that is bundled with an API key and a User Agent. Base of gem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Init

#gitems, #guild, #guilds, #items, #user

Constructor Details

#initialize(api_key, user_agent) ⇒ App

Returns a new instance of App.



19
20
21
22
# File 'lib/dd-api/classes.rb', line 19

def initialize(api_key, user_agent)
    @api_key = api_key
    @user_agent = user_agent
end

Instance Attribute Details

#api_keyString

Returns The api key of the instance.

Returns:

  • (String)

    The api key of the instance.



12
13
14
# File 'lib/dd-api/classes.rb', line 12

def api_key
  @api_key
end

#user_agentString

Returns The user agent of the instance.

Returns:

  • (String)

    The user agent of the instance.



15
16
17
# File 'lib/dd-api/classes.rb', line 15

def user_agent
  @user_agent
end