Module: DashX

Defined in:
lib/dashx.rb,
lib/dashx/client.rb,
lib/dashx/config.rb,
lib/dashx/version.rb

Defined Under Namespace

Classes: Client, Config

Constant Summary collapse

VERSION =
'0.10.0'.freeze

Class Method Summary collapse

Class Method Details

.configure(client_name = :default) {|config = DashX::Config.new| ... } ⇒ Object

Yields:



8
9
10
11
12
# File 'lib/dashx.rb', line 8

def self.configure(client_name = :default)
  yield config = DashX::Config.new

  @clients[client_name] = DashX::Client.new(config)
end

.deliver(urn, parcel) ⇒ Object



14
15
16
# File 'lib/dashx.rb', line 14

def self.deliver(urn, parcel)
  @clients[:default].deliver(urn, parcel)
end

.fetch_contacts(uid) ⇒ Object



30
31
32
# File 'lib/dashx.rb', line 30

def self.fetch_contacts(uid)
  @clients[:default].fetch_contacts(uid)
end

.fetch_item(identifier) ⇒ Object



34
35
36
# File 'lib/dashx.rb', line 34

def self.fetch_item(identifier)
  @clients[:default].fetch_item(identifier)
end

.fetch_stored_preferences(uid) ⇒ Object



38
39
40
# File 'lib/dashx.rb', line 38

def self.fetch_stored_preferences(uid)
  @clients[:default].fetch_stored_preferences(uid)
end

.identify(uid, options) ⇒ Object



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

def self.identify(uid, options)
  @clients[:default].identify(uid, options)
end

.save_contacts(uid, contacts) ⇒ Object



26
27
28
# File 'lib/dashx.rb', line 26

def self.save_contacts(uid, contacts)
  @clients[:default].save_contacts(uid, contacts)
end

.save_stored_preferences(uid, preferenceData) ⇒ Object



42
43
44
# File 'lib/dashx.rb', line 42

def self.save_stored_preferences(uid, preferenceData)
  @clients[:default].save_stored_preferences(uid, preferenceData)
end

.track(event, uid, data) ⇒ Object



22
23
24
# File 'lib/dashx.rb', line 22

def self.track(event, uid, data)
  @clients[:default].track(event, uid, data)
end