Skip to content

NewgroundsIO.objects.ScoreBoard

PsychoGoldfishNG edited this page Aug 18, 2022 · 17 revisions

File: /objects/ScoreBoard.cs
Extends: NewgroundsIO.BaseObject
Contains information about a scoreboard.

Public Properties

id

Type: (int)
The numeric ID of the scoreboard.

name

Type: (string)
The name of the scoreboard.

Public Methods

ScoreBoard

constructor ScoreBoard()

clone

NewgroundsIO.objects.ScoreBoard clone(NewgroundsIO.objects.ScoreBoard cloneTo = null)

Clones the properties of this object to another (or new) object.

Parameters:

Returns NewgroundsIO.objects.ScoreBoard
The object that was cloned to.

Public Coroutines

GetScores

IEnumerator GetScores(string period = "D", string tag = null, bool social = false, int skip = 0, int limit = 10, Action<NewgroundsIO.objects.Response> callback = null)

Gets a list of scores from this board.

Parameters:

  • period (string)
    The overall period to retrieve from. Can be D, W, M, Y or A

  • tag (string)
    An optional tag to filter on. Use null to skip filtering.

  • social (bool)
    Set to true to only see scores from friends.

  • skip (int)
    The number of scores to skip.

  • limit (int)
    The total number of scores to load.

  • callback (Action<NewgroundsIO.objects.Response>)
    A function to call once the scores have loaded.

PostScore

IEnumerator PostScore(int value, string tag = null, Action<NewgroundsIO.objects.Response> callback = null)

Posts a score to this board.

Parameters:

  • value (int)
    The score value to post.

  • tag (string)
    An optional tag to filter on. Use null to skip filtering.

  • callback (Action<NewgroundsIO.objects.Response>)
    A function to call once the score has posted.

Clone this wiki locally