Sha256: c97fc50f70ba10e746ac6042e2d99d05b7f9bf62c1bf9cae53a67b08192b23d1

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

require 'multi_json'
require 'five_mobile_push/client'

module FiveMobilePush
  extend self

  autoload :Device,   'five_mobile_push/device'
  autoload :Notifier, 'five_mobile_push/notifier'
  autoload :Tag,      'five_mobile_push/tag'
  autoload :Payload,  'five_mobile_push/payload'
  autoload :Message,  'five_mobile_push/message'
  autoload :Platform, 'five_mobile_push/platform'

  class UnauthorizedError    < StandardError; end
  class GeneralError         < StandardError; end
  class ServerError          < StandardError; end
  class InvalidPlatformError < StandardError; end
  class InvalidToken         < StandardError; end

  DEFAULT_ID_TYPE = 'native'

  attr_accessor :api_token, :application_uid

  attr_writer :adapter

  # @yield [config] Provides a block to conveniently configure the library
  #
  # @example Simple usage
  #
  #   FiveMobilePush.configure do |config|
  #     config.api_token       = '12345'
  #     config.application_uid = 'myfancyapp'
  #   end
  def configure
    yield self
  end

  def adapter
    @adapter || Faraday.default_adapter
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
five_mobile_push-0.4.7 lib/five_mobile_push.rb