Sha256: 641f862a7d71ad4e9e87686e929df1992637992a55b7e14e1b774f6dd2e1680a
Contents?: true
Size: 627 Bytes
Versions: 17
Compression:
Stored size: 627 Bytes
Contents
module Telegram module Bot module Botan class Api attr_reader :token def initialize(token) @token = token end def track(event, uid, properties = {}) query_str = URI.encode_www_form(token: token, name: event, uid: uid) conn.post("/track?#{query_str}", properties.to_json) end private def conn @conn ||= Faraday.new(url: 'https://api.botan.io') do |faraday| faraday.request :url_encoded faraday.adapter Telegram::Bot.configuration.adapter end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems