Xpert Access

How to use the JSON and XML feeds

1. Creating a JSON or XML feed

JSON or XML feeds are a convinient, standardised way to query the games catalogue and bring it to your side. We provide you an easy yet flexible way to do this via the Games Catalog.

JSON or XML feeds are created automatically via the games catalog script or you can create your own one.

If you prfer to create a JSON or XML feed on your own the feed-URL is http://www.yoflash.com/feed followed by some parameters. The parameters are as follows:

Mandatory variables

format=json                   //MANDATORY, use JSON or XML
publisherid=YOUR-PUBLISHER-ID //MANDATORY

A simple valid JSON feedlink would look like this:

http://www.yoflash.com/feed?format=json&publisherid=YOUR-PUBLISHER-ID

If you prefer a XML feed, then it looks like this:

http://www.yoflash.com/feed?&format=xml&publisherid=YOUR-PUBLISHER-ID

By default the feed limits the number of entries to 25 starting at 0. You can change that using the limit and start variables in your query. FUrther option are allowed:

Optional variables

cat            //INTEGER of the category (i.e. 1=Action, 2=Adventure, etc)
crat //INTEGER from 0 to 5 where 5 is highest rated and 0 is all games
clang //INTEGER of the language used (1=English, 2=German, etc)
csearch //STRING a search string to filter the games
limit //INTEGER limit the number of games in the feed, default is 25
start //INTEGER the offset of the limit parameter, defaults to 0



2. Using the feed

The JSON Feed structure features some status information followed by an games array. If the feed was successfully created, the status variable will be set to OK, otherwise to Error. And explanation of the error message can then be found in the variable message.
If the status is OK, you get information about the limit, limitstart and total games that matched your query. A typical game in the feed has the following properties:

JSON game return variables:

"uid"           //A unique ID of the game
"name"          //The name of the game
"description"   //The description of the game
"instruction"   //The instructions of the game
"slug"          //A unique identifier for URIs
"keywords"      //Comma seperated list of keyowrds
"swfname":      //Full path (URL) to the SWF game 
"thumb100"      //Full path (URL) to the 100x100 Thumbnail
"thumb200"      //Full path (URL)to the 200x200 thumbnail; will be empty if not exists
"screen1"       //Full path (URL) to screenshot 1; will be empty if not exists
"screen2"       //Full path (URL) to screenshot 2; will be empty if not exists
"screen3"       //Full path (URL) to screenshot 3; will be empty if not exists
"screen4"       //Full path (URL) to screenshot 4; will be empty if not exists
"video"         //Video URL (mostly youtube); wil be empty if not exists
"date_created"  //date whenthe entry was created
"date_updated"  //date when the entry was last updated
"date_approved" //date when the entry was approved
"res_x"         //X resolution
"res_y"         //Y resolution
"rating"        //value between 0 and 5 of how good we think the game is
"maincategory"  //String of the main category 
"author"        //String of teh author's username
"categories"    //Comma seperated string of categories (including maincategory)
"languages"     //Comma seperated string of the languages

Please be aware that this feed is completely in a beta-stage and we might change things form time to time.

A typical (start) of the JSON response might look like this:

{"status":"OK","start":0,"limit":25,"total":37,"games":[{"uid":"012329422d07a9fe","name":"WORDIT","description":"If you li  [...]