Sha256: ef06d74af9ae56f13e0d217c3bd15ef0dcc5d06b05990e9f079f750bb201d86b

Contents?: true

Size: 1006 Bytes

Versions: 1

Compression:

Stored size: 1006 Bytes

Contents

require 'dashx/version'
require 'dashx/config'
require 'dashx/client'

module DashX
  @clients = {}

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

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

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

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

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

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

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

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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dashx-0.10.0 lib/dashx.rb