class BotAPI::Auth

Public Class Methods

new() click to toggle source
# File lib/telegram_bot_builder/bot_api.rb, line 84
def initialize
  #return auth
end

Public Instance Methods

auth() click to toggle source
# File lib/telegram_bot_builder/bot_api.rb, line 88
def auth
  method = 'getMe'

  uri = URI.parse(URLBUIDER.build(method))
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  result = http.get(uri.request_uri)

  if result.code == "200"
    object = BotAPI.parse(method, result.body)

    return object
  end
end