Exception: Yt::Errors::MissingAuth

Inherits:
RequestError show all
Defined in:
lib/yt/errors/missing_auth.rb

Instance Method Summary collapse

Methods inherited from RequestError

#description, #explanation, #initialize, #kind, #reasons, #response_body

Constructor Details

This class inherits a constructor from Yt::Errors::RequestError

Instance Method Details

#messageObject


6
7
8
9
10
11
12
# File 'lib/yt/errors/missing_auth.rb', line 6

def message
  "A request to YouTube API was sent without a valid authentication.\n\n\#{more_details}\n".gsub(/^ {8}/, '')
end

#more_detailsObject


14
15
16
17
18
19
20
21
22
# File 'lib/yt/errors/missing_auth.rb', line 14

def more_details
  if scopes && authentication_url && redirect_uri
    more_details_with_authentication_url
  elsif scopes && user_code && verification_url
    more_details_with_verification_url
  else
    more_details_without_url
  end
end