Sha256: 331a26b5104079d212789aebf830931f7024420dc0084adc6c3e8f9bc15f8d50

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

require "typetalk/version"
require 'typetalk/error'
require 'typetalk/api'

require 'hashie'


module Typetalk

  DEFAULT_OPTIONS = {
    client_id: ENV['TYPETALK_CLIENT_ID'],
    client_secret: ENV['TYPETALK_CLIENT_SECRET'],
    redirect_uri: nil,
    grant_type: 'client_credentials', # or 'authorization_code'
    scope: 'topic.read,topic.post,my',
    endpoint: 'https://typetalk.in/api/v1',
    proxy: nil,
  }

  class << self

    def config
      @config ||= Hashie::Mash.new(Typetalk::DEFAULT_OPTIONS)
    end

    def reset_config
      @config = nil
    end

    def configure
      yield config
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typetalk-0.0.2 lib/typetalk.rb
typetalk-0.0.1 lib/typetalk.rb