All pages
Powered by GitBook
1 of 3

Loading...

Loading...

Loading...

/api/cnd/event-tracker/get

Endpoint for fetching event data.

The /api/cnd/event-tracker/get endpoint is used for fetching event data such as release history.

Querying Event Tracker data

REQUEST ENDPOINT

REQUEST ARGUMENTS

Field
Type
Description

CURL REQUEST EXAMPLE

EXAMPLE RESPONSE

filters[date_range_published]

array

Filter on the date range published. Should be an array of two dates - the start and end Example: filters[date_range_published][0] = '2024-01-01 00:00:00' filters[date_range_published][1] = '2024-01-01 23:59:59'

filters[date_range_added]

array

Filter on the date range modified

filters[sort]

array

How to sort the data. Array with sort column and direction

Default: published_date

Sort Values:

  • publish_date

  • modified_date

Example:

filters[sort][0] = 'modified_date'

filters[sort][1] = 'desc'

client_id (required)

string

Your client ID

api_key (required)

string

Your API key

filters[page]

integer

Result page number Default = 0

filters[limit]

integer

Number of rows to return Default = 200 Maximum value = 200

GET https://my.liquidandgrit.com/api/cnd/event-tracker/get
curl --location --globoff 'https://my.liquidandgrit.com/api/cnd/event-tracker/get?client_id=your_client_id&api_key=your_api_key&filters[limit]=20&filters[date_range_modified][0]=2024-01-01%2000%3A00%3A00&filters[date_range_modified][1]=2024-01-20%2023%3A59%3A59&filters[sort][0]=modified_date&filters[sort][1]=desc'
{
    "success": true,
    "total": 1510699,
    "page_total": 1,
    "page_index": 0,
    "results": [
        {
            "id": "127011",
            "activity_id": "55371",
            "activity": "Secret Gold Mine - The Grand Mafia",
            "event_name": "",
            "game": "The Grand Mafia",
            "start": "2024-04-23 00:00:00",
            "end": "2024-04-26 00:00:00",
            "days": "4",
            "publish_date": {
                "date": "2024-04-23 22:15:23.000000",
                "timezone_type": 3,
                "timezone": "America/Los_Angeles"
            },
            "modified_date": {
                "date": "2024-04-23 22:15:23.000000",
                "timezone_type": 3,
                "timezone": "America/Los_Angeles"
            },
            "permalink": "https://my.liquidandgrit.com/secret-gold-mine-the-grand-mafia/gallery/secret-gold-mine-the-grand-mafia"
        }
    ]
}

API Documentation

Information on Liquid and Grit’s API

Overview

Liquid and Grit has developed a RESTful API and is available to select clients to support their need to directly access our data. As a RESTful API, clients are free to use their programming tool of choice and use standard HTTP features to access the data.

All API calls are made to the following endpoints and all responses will return a JSON object:

  • - Feature Database

  • - Events

Authentication

The API requires authentication in order for a request to be served. You will need two items of information to be successfully authenticated:

  • client id

  • api key

This authentication information should be included in every API request presented to our server.

Please contact your Liquid and Grit representative for details on acquiring the above credentials or email [email protected].

API access is for Enterprise level account holders only.

Querying the Data

The API automates the Features Database query process currently provided by our online tool and accepts only the GET method. Other HTTP methods are not allowed and will result in a client error.

The API requires you to submit all necessary information in one query string. This includes both your credentials and other information needed to complete your data request. The components of this query string are provided below. Please note that some are required while others are optional.

To illustrate use of our API, an example using Python is presented below.

Using Python with the REST API

The Python example uses the requests library to process the request and the json library to read the delivered data.

After importing the necessary libraries, the above example defines your credentials and the endpoint (url). The next step is to construct the complete query string before passing it to the API using the request library. This last step is explained in more detail below.

Define Query String

The query string is passed as a Python dictionary with each component of the string representing key:value pairs. The first three components are your credentials (client-id, api-key) and required ‘id’. The next component is the filter, which defines the parameters used for data selection.

If using the standard requests library, the filter array must be passed one component at a time using index[notation] slicers to specify each part of the filter array as a separate parameter in the query string. For example, to identify the filter parameter ‘page’, you will specify the key:value pair as ‘filter[page]’: @value. For filter parameters accepting a range of values (e.g. date_range_published or date_range_added), you will need to follow the parameter identification with an index of [0] or [1] to identify the start and end date respectively as demonstrated in the example.

API Response

The API will return a JSON object in response to your request. The object will arrive in plain text format and will require the use of the json library to parse the data. In the example, the json.load method is used to read the object text and specifies the ‘results’ key using index notation ([‘results’][0]) to access the first record (displayed below).

/api/cnd/get
/api/cnd/event-tracker/get

/api/cnd/get

Endpoint for fetching data from the Features Database.

The /api/cnd/get endpoint is used for fetching data from our Features Database.

Querying data from the Features Database

REQUEST ENDPOINT

REQUEST ARGUMENTS

Field
Type
Description

CURL REQUEST EXAMPLE

EXAMPLE RESPONSE

filters[page]

integer

Result page number Default = 0

filters[limit]

integer

Number of rows to return Default = 200 Maximum value = 200

filters[date_range_published]

array

Filter on the date range published. Should be an array of two dates - the start and end Example: filters[date_range_published][0] = '2024-01-01 00:00:00' filters[date_range_published][1] = '2024-01-01 23:59:59'

filters[date_range_added]

array

Filter on the date range modified

client_id (required)

string

Your client ID

api_key (required)

string

Your API key

id (required)

integer

The Data ID

1 = Features Database

filters[tag_group_data]

boolean

Flag to return tag group data 1 = True

GET https://my.liquidandgrit.com/api/cnd/get
curl --location --globoff 'https://my.liquidandgrit.com/api/cnd/get?client_id=your_cliend_id&api_key=your_api_key&id=1&filters[limit]=100&filters[date_range_published][0]=2024-01-01%2000%3A00%3A00&filters[date_range_published][1]=2024-01-10%2023%3A59%3A59' 
{
    "success": true,
    "total": 43380,
    "page_total": 1,
    "page_index": 0,
    "results": [
        {
            "id": "49660",
            "version_id": "232237",
            "title": "Character Madness! - Tennis Clash",
            "subtitle": null,
            "excerpt": null,
            "author": "John Doe",
            "publish_date": {
                "date": "2024-01-01 11:11:11.000000",
                "timezone_type": 3,
                "timezone": "America/Los_Angeles"
            },
            "type": "2",
            "comment_count": null,
            "order_index": "0",
            "file_hash": null,
            "enabled": "1",
            "alternative_titles": "Character Madness 1,Character Madness 2",
            "image_node_id": "1137737",
            "default_image_id": "4741482",
            "default_image_actual_width": "225",
            "default_image_actual_height": "300",
            "default_image_size": "131068",
            "default_image_extension": "png",
            "default_image_credit": null,
            "default_image_caption": "",
            "default_image_added": "1676913777",
            "extension": "png",
            "default_image": "https://732c2069d187077d2b87-0063d8ca473f04bfd7f021ac67664965.ssl.cf2.rackcdn.com/8f7ba4f6a870bd4b06dfb9375b6b7860.png",
            "permalink": "https://my.liquidandgrit.com/library/gallery/character-madness-tennis-clash",
            "release_history": [
                {
                    "id": "3",
                    "alternative_title": "Character Madness 1",
                    "start_date": "2024-01-02 00:00:00",
                    "end_date": "2024-01-02 00:00:00"
                },
                {
                    "id": "4",
                    "alternative_title": "Character Madness 2",
                    "start_date": "2024-01-03 00:00:00",
                    "end_date": "2023-01-03 00:00:00"
                },
            ]
        }
    ]
}