GET api/Score/Game/{productId}/Ranks?top={top}&dateEnd={dateEnd}&periodInMinutes={periodInMinutes}

Get a game's top scores within an optional time range

Request Information

URI Parameters

NameDescriptionTypeAdditional information
productId

Game's Product-ID

integer

Required

top

[Optional] How many top scores to retrieve in decending order

integer

Default value is 1

dateEnd

[Optional] End of time range in Unix time (number of seconds elapsed since 00:00:00 UTC, 1970-01-01) If not specified, the default end of time range is the current time ( NOW )

integer

Default value is 0

periodInMinutes

[Optional] The length of time range period in minutes If not specified, the whole range is defined ( range up to now ), and the dateEnd is ignored.

integer

Default value is 0

Body Parameters

None.

Response Information

Resource Description

Top Score List of the following items: { Score, UserID, Date }

GameTopScores
NameDescriptionTypeAdditional information
TopScores

Collection of TopScore

None.

err

boolean

None.

message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "TopScores": [
    {
      "Score": 1,
      "UserID": "sample string 2"
    },
    {
      "Score": 1,
      "UserID": "sample string 2"
    }
  ],
  "err": true,
  "message": "sample string 2"
}

application/xml, text/xml

Sample:
<GameTopScores xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Yummy.Core.Score">
  <err>true</err>
  <message>sample string 2</message>
  <TopScores>
    <TopScore>
      <Score>1</Score>
      <UserID>sample string 2</UserID>
    </TopScore>
    <TopScore>
      <Score>1</Score>
      <UserID>sample string 2</UserID>
    </TopScore>
  </TopScores>
</GameTopScores>