Class: Google::Apis::GamesV1::PlayerScoreResponse

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 list of leaderboard entry resources.

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) ⇒ PlayerScoreResponse

Returns a new instance of PlayerScoreResponse.



2621
2622
2623
# File 'generated/google/apis/games_v1/classes.rb', line 2621

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

Instance Attribute Details

#beaten_score_time_spansArray<String>

The time spans where the submitted score is better than the existing score for that time span. 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 beatenScoreTimeSpans

Returns:

  • (Array<String>)


2590
2591
2592
# File 'generated/google/apis/games_v1/classes.rb', line 2590

def beaten_score_time_spans
  @beaten_score_time_spans
end

#formatted_scoreString

The formatted value of the submitted score. Corresponds to the JSON property formattedScore

Returns:

  • (String)


2595
2596
2597
# File 'generated/google/apis/games_v1/classes.rb', line 2595

def formatted_score
  @formatted_score
end

#kindString

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

Returns:

  • (String)


2601
2602
2603
# File 'generated/google/apis/games_v1/classes.rb', line 2601

def kind
  @kind
end

#leaderboard_idString

The leaderboard ID that this score was submitted to. Corresponds to the JSON property leaderboardId

Returns:

  • (String)


2606
2607
2608
# File 'generated/google/apis/games_v1/classes.rb', line 2606

def leaderboard_id
  @leaderboard_id
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)


2612
2613
2614
# File 'generated/google/apis/games_v1/classes.rb', line 2612

def score_tag
  @score_tag
end

#unbeaten_scoresArray<Google::Apis::GamesV1::PlayerScore>

The scores in time spans that have not been beaten. As an example, the submitted score may be better than the player's DAILY score, but not better than the player's scores for the WEEKLY or ALL_TIME time spans. Corresponds to the JSON property unbeatenScores



2619
2620
2621
# File 'generated/google/apis/games_v1/classes.rb', line 2619

def unbeaten_scores
  @unbeaten_scores
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2626
2627
2628
2629
2630
2631
2632
2633
# File 'generated/google/apis/games_v1/classes.rb', line 2626

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