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

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

Overview

This is a JSON template for a player score.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PlayerScore

Returns a new instance of PlayerScore.


2531
2532
2533
# File 'generated/google/apis/games_v1/classes.rb', line 2531

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)

2503
2504
2505
# File 'generated/google/apis/games_v1/classes.rb', line 2503

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)

2509
2510
2511
# File 'generated/google/apis/games_v1/classes.rb', line 2509

def kind
  @kind
end

#scoreString

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

Returns:

  • (String)

2514
2515
2516
# File 'generated/google/apis/games_v1/classes.rb', line 2514

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)

2520
2521
2522
# File 'generated/google/apis/games_v1/classes.rb', line 2520

def score_tag
  @score_tag
end

#time_spanString

The time span for this player score. Possible values are:

  • "ALL_TIME" - The score is an all-time score.
  • "WEEKLY" - The score is a weekly score.
  • "DAILY" - The score is a daily score. Corresponds to the JSON property timeSpan

Returns:

  • (String)

2529
2530
2531
# File 'generated/google/apis/games_v1/classes.rb', line 2529

def time_span
  @time_span
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2536
2537
2538
2539
2540
2541
2542
# File 'generated/google/apis/games_v1/classes.rb', line 2536

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