Class: Telegram::Bot::Botan::Api
- Inherits:
-
Object
- Object
- Telegram::Bot::Botan::Api
- Includes:
- HTTParty
- Defined in:
- lib/telegram/bot/botan/api.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token) ⇒ Api
constructor
A new instance of Api.
- #track(event, uid, properties = {}) ⇒ Object
Constructor Details
#initialize(token) ⇒ Api
11 12 13 |
# File 'lib/telegram/bot/botan/api.rb', line 11 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/telegram/bot/botan/api.rb', line 7 def token @token end |
Instance Method Details
#track(event, uid, properties = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/telegram/bot/botan/api.rb', line 15 def track(event, uid, properties = {}) self.class.post('/track', query: { token: token, name: event, uid: uid }, body: properties.to_json) end |