Class: Google::Apis::GamesV1::PlayerEvent

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

Overview

An event status resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PlayerEvent

Returns a new instance of PlayerEvent.



2008
2009
2010
# File 'lib/google/apis/games_v1/classes.rb', line 2008

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

Instance Attribute Details

#definition_idString

The ID of the event definition. Corresponds to the JSON property definitionId

Returns:

  • (String)


1983
1984
1985
# File 'lib/google/apis/games_v1/classes.rb', line 1983

def definition_id
  @definition_id
end

#formatted_num_eventsString

The current number of times this event has occurred, as a string. The formatting of this string depends on the configuration of your event in the Play Games Developer Console. Corresponds to the JSON property formattedNumEvents

Returns:

  • (String)


1990
1991
1992
# File 'lib/google/apis/games_v1/classes.rb', line 1990

def formatted_num_events
  @formatted_num_events
end

#kindString

Uniquely identifies the type of this resource. Value is always the fixed string games#playerEvent. Corresponds to the JSON property kind

Returns:

  • (String)


1996
1997
1998
# File 'lib/google/apis/games_v1/classes.rb', line 1996

def kind
  @kind
end

#num_eventsFixnum

The current number of times this event has occurred. Corresponds to the JSON property numEvents

Returns:

  • (Fixnum)


2001
2002
2003
# File 'lib/google/apis/games_v1/classes.rb', line 2001

def num_events
  @num_events
end

#player_idString

The ID of the player. Corresponds to the JSON property playerId

Returns:

  • (String)


2006
2007
2008
# File 'lib/google/apis/games_v1/classes.rb', line 2006

def player_id
  @player_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2013
2014
2015
2016
2017
2018
2019
# File 'lib/google/apis/games_v1/classes.rb', line 2013

def update!(**args)
  @definition_id = args[:definition_id] if args.key?(:definition_id)
  @formatted_num_events = args[:formatted_num_events] if args.key?(:formatted_num_events)
  @kind = args[:kind] if args.key?(:kind)
  @num_events = args[:num_events] if args.key?(:num_events)
  @player_id = args[:player_id] if args.key?(:player_id)
end