Class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest

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

Overview

Life of a query: - When a game starts in a new location, your game server issues a SamplePlayableLocations request. The request specifies the S2 cell, and contains one or more "criteria" for filtering: - Criterion 0: i locations for long-lived bases, or level 0 monsters, or... - Criterion 1: j locations for short-lived bases, or level 1 monsters, ... - Criterion 2: k locations for random objects. - etc (up to 5 criterion may be specified). PlayableLocationList will then contain mutually exclusive lists of PlayableLocation objects that satisfy each of the criteria. Think of it as a collection of real-world locations that you can then associate with your game state. Note: These points are impermanent in nature. E.g, parks can close, and places can be removed. The response specifies how long you can expect the playable locations to last. Once they expire, you should query the samplePlayableLocations API again to get a fresh view of the real world.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest

Returns a new instance of GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest.



405
406
407
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 405

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

Instance Attribute Details

#area_filterGoogle::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleAreaFilter

Specifies the area to search for playable locations. Corresponds to the JSON property areaFilter



397
398
399
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 397

def area_filter
  @area_filter
end

#criteriaArray<Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleCriterion>

Required. Specifies one or more (up to 5) criteria for filtering the returned playable locations. Corresponds to the JSON property criteria



403
404
405
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 403

def criteria
  @criteria
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



410
411
412
413
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 410

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