Class: GoogleMapsPlatform::CustomQueryAuthentication

Inherits:
CoreLibrary::QueryAuth
  • Object
show all
Defined in:
lib/google_maps_platform/http/auth/custom_query_authentication.rb

Overview

Utility class for custom query_parameter authorization.

Instance Method Summary collapse

Constructor Details

#initialize(custom_query_authentication_credentials) ⇒ CustomQueryAuthentication

Initialization constructor.



16
17
18
19
20
21
22
# File 'lib/google_maps_platform/http/auth/custom_query_authentication.rb', line 16

def initialize(custom_query_authentication_credentials)
  auth_params = {}
  auth_params['key'] = custom_query_authentication_credentials.key unless
    custom_query_authentication_credentials.nil? || custom_query_authentication_credentials.key.nil?

  super auth_params
end

Instance Method Details

#error_messageObject

Display error message on occurrence of authentication failure.



11
12
13
# File 'lib/google_maps_platform/http/auth/custom_query_authentication.rb', line 11

def error_message
  'CustomQueryAuthentication: key is undefined.'
end