Class: Google::Apis::GamesV1::ScoreSubmission

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 request to submit a score to leaderboards.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ScoreSubmission

Returns a new instance of ScoreSubmission.



2421
2422
2423
# File 'lib/google/apis/games_v1/classes.rb', line 2421

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


2397
2398
2399
# File 'lib/google/apis/games_v1/classes.rb', line 2397

def kind
  @kind
end

#leaderboard_idString

The leaderboard this score is being submitted to. Corresponds to the JSON property leaderboardId

Returns:

  • (String)


2402
2403
2404
# File 'lib/google/apis/games_v1/classes.rb', line 2402

def leaderboard_id
  @leaderboard_id
end

#scoreFixnum

The new score being submitted. Corresponds to the JSON property score

Returns:

  • (Fixnum)


2407
2408
2409
# File 'lib/google/apis/games_v1/classes.rb', line 2407

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)


2413
2414
2415
# File 'lib/google/apis/games_v1/classes.rb', line 2413

def score_tag
  @score_tag
end

#signatureString

Signature Values will contain URI-safe characters as defined by section 2.3 of RFC 3986. Corresponds to the JSON property signature

Returns:

  • (String)


2419
2420
2421
# File 'lib/google/apis/games_v1/classes.rb', line 2419

def signature
  @signature
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2426
2427
2428
2429
2430
2431
2432
# File 'lib/google/apis/games_v1/classes.rb', line 2426

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