lib/telegram/bot/api.rb in telegram-bot-ruby-0.2.2 vs lib/telegram/bot/api.rb in telegram-bot-ruby-0.2.3

- old
+ new

@@ -1,9 +1,9 @@ module Telegram module Bot class Api - include HTTParty + include HTTMultiParty ENDPOINTS = %w( getMe sendMessage forwardMessage sendPhoto sendAudio sendDocument sendSticker sendVideo sendLocation sendChatAction getUserProfilePhotos getUpdates setWebhook @@ -27,10 +27,10 @@ ENDPOINTS.include?(method_name.to_s) ? call(method_name, *args) : super end def call(endpoint, raw_params = {}) params = build_params(raw_params) - response = self.class.get("/bot#{token}/#{endpoint}", query: params) + response = self.class.post("/bot#{token}/#{endpoint}", query: params) if response.code == 200 response.to_h else fail Exceptions::ResponseError.new(response), 'Telegram API has returned the error.'