Class: Google::Apis::GamesV1::PlayerScore

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

A player score.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PlayerScore

Returns a new instance of PlayerScore.



2370
2371
2372
# File 'lib/google/apis/games_v1/classes.rb', line 2370

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

Instance Attribute Details

#formatted_scoreString

The formatted score for this player score. Corresponds to the JSON property formattedScore

Returns:

  • (String)


2346
2347
2348
# File 'lib/google/apis/games_v1/classes.rb', line 2346

def formatted_score
  @formatted_score
end

#kindString

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

Returns:

  • (String)


2352
2353
2354
# File 'lib/google/apis/games_v1/classes.rb', line 2352

def kind
  @kind
end

#scoreFixnum

The numerical value for this player score. Corresponds to the JSON property score

Returns:

  • (Fixnum)


2357
2358
2359
# File 'lib/google/apis/games_v1/classes.rb', line 2357

def score
  @score
end

#score_tagString

Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. Corresponds to the JSON property scoreTag

Returns:

  • (String)


2363
2364
2365
# File 'lib/google/apis/games_v1/classes.rb', line 2363

def score_tag
  @score_tag
end

#time_spanString

The time span for this player score. Corresponds to the JSON property timeSpan

Returns:

  • (String)


2368
2369
2370
# File 'lib/google/apis/games_v1/classes.rb', line 2368

def time_span
  @time_span
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2375
2376
2377
2378
2379
2380
2381
# File 'lib/google/apis/games_v1/classes.rb', line 2375

def update!(**args)
  @formatted_score = args[:formatted_score] if args.key?(:formatted_score)
  @kind = args[:kind] if args.key?(:kind)
  @score = args[:score] if args.key?(:score)
  @score_tag = args[:score_tag] if args.key?(:score_tag)
  @time_span = args[:time_span] if args.key?(:time_span)
end