1. Home
  2. Docs
  3. Documentation
  4. Games
  5. GET: Random game

GET: Random game

/v1/game/random

Attributes

The random game endpoint has no required attributes

Optional parameters

Optional parameters are included via the query string, optional parameters for the random game route are:

Picture

Boolean: Returned game must include an image.

Developer

Boolean: Returned game must have a developer set.

Publisher

Boolean: Returned game must have a publisher set.

Year

Boolean: Returned game must have a year set.

Youtube

Boolean: Returned game must have a youtube video set.

Site

String: Return a random game from the given site id.

Example

In this example, we will receive a game from the Sega Dreamcast site that has a picture, developer, publisher, year and youtube video set. Every time this endpoint is called, a different game will be returned.

Endpoint

/v1/game/random?site=dc&picture=1&developer=1&publisher=1&year=1&youtube=1

Response

{
    "Game": {
        "ID": "110073",
        "Title": "ChuChu Rocket!",
        "Description": "",
        "Picture": "http://dc.retrocrypt.com/inc/game_images/1621487968.jpg",
        "Year": "1999",
        "Youtube": "https://www.youtube.com/embed/Ot6QGMKPQc0",
        "Developer": "Sonic Team",
        "Publisher": "Sega",
        "URL": "http://dc.retrocrypt.com/game/110073/ChuChu+Rocket%21/",
        "Site": {
            "ID": "11",
            "Slug": "DC",
            "Title": "RetroCrypt Dreamcast",
            "URL": "http://dc.retrocrypt.com"
        },
        "Routes": {
            "Year": "https://retrocrypt.com/rest/v1/year/1999",
            "Developer": "https://retrocrypt.com/rest/v1/developer/Sonic+Team",
            "Publisher": "https://retrocrypt.com/rest/v1/publisher/Sega",
            "Cheats": "https://retrocrypt.com/rest/v1/game/cheats/110073"
        }
    },
    "Requester": "f13",
    "Route": "/v1/random",
    "Status": "200",
    "Message": "success"
}