Class: Google::Apis::ApikeysV2::V2BrowserKeyRestrictions

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/apikeys_v2/classes.rb,
lib/google/apis/apikeys_v2/representations.rb,
lib/google/apis/apikeys_v2/representations.rb

Overview

The HTTP referrers (websites) that are allowed to use the key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ V2BrowserKeyRestrictions

Returns a new instance of V2BrowserKeyRestrictions.



215
216
217
# File 'lib/google/apis/apikeys_v2/classes.rb', line 215

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#allowed_referrersArray<String>

A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. Corresponds to the JSON property allowedReferrers

Returns:

  • (Array<String>)


213
214
215
# File 'lib/google/apis/apikeys_v2/classes.rb', line 213

def allowed_referrers
  @allowed_referrers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



220
221
222
# File 'lib/google/apis/apikeys_v2/classes.rb', line 220

def update!(**args)
  @allowed_referrers = args[:allowed_referrers] if args.key?(:allowed_referrers)
end