Answer the question
In order to leave comments, you need to log in
How to get around this Faraday::ConnectionFailed error?
There is a simple code. Every 10 seconds it sends an http request and receives a response.
require 'vk-ruby'
app = VK::Application.new(app_id: ------, version: '5.71', access_token: '--------------------')
check = 0
while true
get = app.vk_call 'messages.getDialogs?count=2'
body = get['items'][0]['message']['body']
if body != check
p body
check = body
end
sleep 10
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question