lib/yt/request.rb
# In case an authorized request responds with "Unauthorized", checks
# if the original access token can be refreshed. If that's the case,
# clears the memoized variables and returns true, so the request can
# be run again, otherwise raises an error.
In case an authorized request responds with "Unauthorized", checks
if the original access token can be refreshed. If that's the case,
clears the memoized variables and returns true, so the request can
be run again, otherwise raises an error.
In case an authorized request responds with " Unauthorized " checks if the original access token can be refreshed . If that ' s the case clears the memoized variables and returns true so the request can be run again otherwise raises an error .
def refresh_token_and_retry?
      if unauthorized? && @auth && @auth.refreshed_access_token?
        @response = @http_request = @uri = nil
        true
      end
    rescue Errors::MissingAuth
      false
    end
def refresh_token_and_retry? if unauthorized? && @auth && @auth . refreshed_access_token? @response = @http_request = @uri = nil true end rescue Errors :: MissingAuth false end
In case an authorized request responds with "Unauthorized", checks
if the original access token can be refreshed.
In case an authorized request responds with " Unauthorized " checks if the original access token can be refreshed .