Update api.rb

just fixing the timeout, can't bother updating my r version right now.. so just a small change for compatibility