Sha256: d23cb747cea5a3d37c1696ff14ab7efc4f95bcbb08c2951eaecfa41cc22662b2

Contents?: true

Size: 474 Bytes

Versions: 15

Compression:

Stored size: 474 Bytes

Contents

module Telegram
  module Bot
    module Botan
      class Api
        include HTTParty

        attr_reader :token

        base_uri 'https://api.botan.io'

        def initialize(token)
          @token = token
        end

        def track(event, uid, properties = {})
          self.class.post('/track',
                          query: { token: token, name: event, uid: uid },
                          body: properties.to_json)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
telegram-bot-ruby-0.4.2 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.4.1 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.4.0 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.11 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.10 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.9 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.8 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.7 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.6 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.5 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.4 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.3 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.2 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.1 lib/telegram/bot/botan/api.rb
telegram-bot-ruby-0.3.0 lib/telegram/bot/botan/api.rb