Lucky Book Content
Lists lucky book content, paged 20 entries at a time.
| Method | GET |
| Path | /api/v1/content/{cat}/{language}/{index} |
| Full URL | https://backend.4dnum.com/api/v1/content/{cat}/{language}/{index} |
Request
| Attribute | Type | Mandatory | Example | Description |
|---|---|---|---|---|
cat | String | Yes | gzt | Lucky book abbreviation. See table below. |
language | String | Yes | en | en = English, cn = Chinese, my = Malay. |
index | String | Yes | 20 | Page offset. See paging below. |
cat values
| Value | Lucky book |
|---|---|
gzt | Guan Yin Ma Dictionary |
qzt | Tua Pek Kong (Qian) Dictionary |
wzt | Tua Pek Kong (Wan) Dictionary |
Paging
index selects a 20-entry block:
index | Returns |
|---|---|
20 | entries 20 – 39 |
40 | entries 41 – 59 |
note
The block boundaries are quoted from the source document as-is. Verify the exact off-by-one behaviour of the second block against a live response before relying on it for pagination maths.
Response
| Attribute | Type | Example | Description |
|---|---|---|---|
number | String | 020 | Number in the lucky book. Zero-padded. |
content | String | LIU SHAN | Meaning of the number, in the requested language. |
image | String | https://backend.4dnum.com/image.png | Image for that meaning. |
Example
curl https://backend.4dnum.com/api/v1/content/gzt/en/20
[
{
"number": "020",
"content": "LIU SHAN",
"image": "https://backend.4dnum.com/image.png"
}
]
tip
number is zero-padded (020, not 20). Compare as strings, or normalise with
parseInt on both sides before comparing.