Module: Mkmapi

Defined in:
lib/mkmapi.rb,
lib/version.rb,
lib/mkmapi/base.rb,
lib/mkmapi/agent.rb,
lib/mkmapi/session.rb,
lib/mkmapi/marketplace.rb

Defined Under Namespace

Classes: Agent, Base, Marketplace, Session

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.auth(params) ⇒ Object



24
25
26
# File 'lib/mkmapi.rb', line 24

def self.auth(params)
  Session.new connection, params
end

.connect(url = "https://api.cardmarket.com/ws/v2.0") ⇒ Object



14
15
16
17
18
19
# File 'lib/mkmapi.rb', line 14

def self.connect(url = "https://api.cardmarket.com/ws/v2.0")
  @connection = Faraday.new url, ssl: { verify: false } do |faraday|
    # faraday.response :logger
    faraday.adapter Faraday.default_adapter
  end
end

.connectionObject



20
21
22
# File 'lib/mkmapi.rb', line 20

def self.connection
  @connection ||= connect
end