user.getGames

Description

Returns a list of games related to a user.

Parameters

Required Type Name Description
required string user The user from whom you want games
optional int number Represent how many games will be returned. Default is 5

Error Codes

CodeDescription
1 something bad happened during process
2 user is not a string or is not a valid user login
number is not an integer or is not a strictly positive number
3 user is not found into the database

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=user.getGames&user=bastien
http://www.pictogame.com/services/public/?method=user.getGames&user=luigi75&number=10

Example Return XML

<?xml version="1.0" encoding="UTF-8" ?>
<ResultSet totalResultsReturned="2" totalResultsAvailable="52">
  <Result>
    <GameCode>DURsU9iNTIB5</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>
    <GameCode>DURsU3iNTIB4</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>
</ResultSet>

Notes

If the user exists but hasn't yet created games, the XML returned was something like this:

<?xml version="1.0" encoding="UTF-8" ?>
<ResultSet totalResultsReturned="0" totalResultsAvailable="0">
</ResultSet>

Personal Tools