Module: OpenX::Services

Defined in:
lib/openx/services.rb,
lib/openx/services/base.rb,
lib/openx/services/zone.rb,
lib/openx/services/agency.rb,
lib/openx/services/banner.rb,
lib/openx/services/channel.rb,
lib/openx/services/session.rb,
lib/openx/services/campaign.rb,
lib/openx/services/publisher.rb,
lib/openx/services/advertiser.rb

Defined Under Namespace

Classes: Advertiser, Agency, Banner, Base, Campaign, Channel, Publisher, Session, Zone

Constant Summary collapse

@@connection =
nil

Class Method Summary collapse

Class Method Details

.default_connectionObject

Default connection



18
19
20
# File 'lib/openx/services.rb', line 18

def self.default_connection
  @@connection ||= establish_connection(OpenX.configuration)
end

.establish_connection(config) ⇒ Object



22
23
24
25
26
# File 'lib/openx/services.rb', line 22

def self.establish_connection(config)
  connection = Session.new(config['url'])
  connection.create config['username'], config['password']
  connection
end