4. Advanced features

The API support some advanced usage, you can find all the doc bellow
You can suggest some other features in the official Discord .

4.1. Etags

4.1.1. If-Match

The If-Match HTTP request header makes the request conditional. For GET methods, the server will send back the requested resource only if it matches one of the listed ETags .

see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match .

4.1.2. If-None-Match

The If-None-Match HTTP request header makes the request conditional. For GET methods, the server will send back the requested resource only if it doesn’t have an ETag matching the given ones.

see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match .

4.2. Global argument

4.2.1. JSON Path

A basic knowledge of the API and JSON Path is required.

The JSON Path selector is a way to select data in the query.
The root ( $ ) of the selector is the field data in the response.
This is based on the python-jsonpath-rw-ext , see the doc to know how to use it.

Warning

Don’t forget to encode special characters ($, +, -, *, /).

Select the handle only:

GET / ( string: apikey ) /v1/live/user/dymerz?json_path=$.profile.display
In this example, we getting the user dymerz from the live , but we also have a json_path parameter with the value: profile.display .
This will result of selecting the display only:
{
  "message": "ok",
  "source": "live",
  "success": 1,
  "data": "[ΩP] Dymerz"
}

Select all nickname from a search:

GET / ( string: apikey ) /v1/live/users/dyme?json_path=[*].nickname
{
  "message": "ok",
  "source": "live",
  "success": 1,
  "data": [
    "dyme13010",
    "dymek",
    "Dymek92",
    "Dymen",
    "Dymensi",
    "Dymer",
    "Dymerz",
    "Dymestl",
    "Dymethyl",
    "Dymetik"
  ]
}