Sha256: 11698df3d74b1342376acf56b8e06b780ff89122e45682ac18906e39bf022268

Contents?: true

Size: 685 Bytes

Versions: 3

Compression:

Stored size: 685 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.com/api/v1',
    proxy: nil,
    user_agent: "Typetalk Rubygem #{Typetalk::VERSION}",
  }

  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

3 entries across 3 versions & 1 rubygems

Version Path
typetalk-0.1.1 lib/typetalk.rb
typetalk-0.1.0 lib/typetalk.rb
typetalk-0.0.6 lib/typetalk.rb