Table of Contents
game.getList
Description
Returns a list of different predefined games such as most viewed, last created, … (see below)
Parameters
| Required | Type | Name | Description |
|---|---|---|---|
| required | int | type | Represent the type of games you want |
| optional | int | number | Represent how many games will be returned. Default is 5 |
type could be one of the following:
- 0 - most viewed games of all time
- 1 - most viewed games of this month
- 2 - most viewed games of this week
- 3 - most viewed games of this day
- 4 - best rated games
- 5 - latest created games
Error Codes
| Code | Description |
|---|---|
| 1 | something bad happened during process |
| 2 | type is not an integer or is not a predefined constant used in API |
| number is not an integer or is not a strictly positive number |
If an error occured, an xml with the error code and a brief summary are returned.
Please see this page for more details.
Request Example(s)
http://www.pictogame.com/services/public/?method=game.getList&type=1
http://www.pictogame.com/services/public/?method=game.getList&type=0&number=10
Example Return XML
<?xml version="1.0" encoding="UTF-8" ?> <ResultSet totalResultsReturned="3" totalResultsAvailable="125"> <Result> <Username>foobar</Username> <GameCode>wXnpNphQOgM1</GameCode> <Title>My game title</Title> <Description></Description> <Tags></Tags> <RatingAverage>4.6</RatingAverage> <RatingCount>12</RatingCount> <Views>415</Views> <Created>2007-12-04 17:22:54</Created> <Updated>2007-12-04 17:43:31</Updated> </Result> <Result> <Username>bar</Username> <GameCode>wXnpNphQOgM2</GameCode> <Title>Dance Dance</Title> <Description></Description> <Tags></Tags> <RatingAverage>0</RatingAverage> <RatingCount>0</RatingCount> <Views>1</Views> <Created>2007-12-04 17:22:54</Created> <Updated>2007-12-04 17:22:54</Updated> </Result> <Result> <Username>foo</Username> <GameCode>wXnpNphQOgM3</GameCode> <Title>My title</Title> <Description>this is the most funny game i have made</Description> <Tags>kick,ass,bill,clinton</Tags> <RatingAverage>3.0</RatingAverage> <RatingCount>1</RatingCount> <Views>4</Views> <Created>2007-12-04 17:22:54</Created> <Updated>2007-12-04 17:43:31</Updated> </Result> </ResultSet>