Hasil pencarian:
{{term.word}}

Kitab Gaul API (v. October 2015)

The Basics

Kitab Gaul API is exposed as RESTful interfaces over HTTP. Currently, there is no authentication schema/requirement, all the data returned are public data. When the API is updated to allow changes and personalized content, Kitab Gaul will update this document to reflect that.

Searching Terms

Search for terms already defined in Kitab Gaul. This endpoint can only return up to 100 terms.

Resource URL

GET /api/entries;search

Parameters

keyword
(required)
Specifies the string to search.
includeContent Specifies whether the search should include matching the definition and example. If false, only the word will be searched.
Valid values: true, false.
Default value: false.
maxCount Specifies how many matched terms should be returned at the most.
Default value: 5.
Hard maximum limit: 100.

Sample Request

GET https://kitabgaul.com/api/entries;search?keyword=gaul&includeContent=true&maxCount=10

Sample Response

{
    "terms": [
        {
            "word": "gaptek",
            "slug": "gaptek"
        },
        {
            "word": "G2GTL",
            "slug": "g2gtl"
        },
        ...
    ]
}

Implementation Considerations

A term is defined by two fields, word and slug. Imagine word as the string to display to the users and slug is the string to use when communicating with Kitab Gaul. Most of the time the two are identical, but for more complex words, the difference is significant.
Calling the endpoint with includeContent parameter set to true slows down the response significantly. For better user experience, you can call once with the parameter set to false and if nothing gets returned, do another call with the parameter set to true.

Top Entries

Get entries sorted by specific attribute (latest, trending, or best).

Resource URL

GET /api/entries;latest
GET /api/entries;trending
GET /api/entries;best

Resource URL

GET /api/entries;latest

Parameters

maxCount Specifies how many entries should be returned at the most.
Default value: 5.
Hard maximum limit: 100.

Sample Request

GET https://kitabgaul.com/api/entries;latest?maxCount=10

Sample Response

{
    "entries": [
        {
            "authorName": "Edwin",
            "authorId": "13671459139615465501",
            "word": "bey",
            "slug": "bey",
            "definition": "Sayang\nBiasa digunakan pada status medsos",
            "example": "Bey strife = sayang strife"
        },
        {
            "authorName": "Bodi Kuat",
            "authorId": "18028861389589097563",
            "word": "Sowak",
            "slug": "sowak",
            "definition": "Ucapan ini digunakan pada orang yg berkomentar diluar topik...",
            "example": "A: bagus gambarnya gan.... TS: thanks GAN... :)..."
        },
        ...
    ]
}

Implementation Considerations

You may encounter entries with authorId value set to null. This is a legacy case where the author was not a confirmed member. You should treat this as an unknown author.

Entries Detail

Get a list of entries for a specific term.

Resource URL

GET /api/entries/{slug}

Sample Request

GET https://kitabgaul.com/api/entries/gaul

Sample Response

{
    "entries": [
        {
            "authorName": "Master Antonius Arthur",
            "authorId": "1619121072041879538",
            "word": "gaul",
            "slug": "gaul",
            "definition": "gagal ulangan",
            "example": "kamu gaul y\r\nkamu gagal ulangan y"
        },
        ...
    ]
}

Implementation Considerations

You may encounter entries with authorId value set to null. This is a legacy case where the author was not a confirmed member. You should treat this as an unknown author.

Member Detail

Get details about a member and list of approved terms for that specific member.

Resource URL

GET /api/members/{authorId}

Sample Request

GET https://kitabgaul.com/api/members/3018443867005700323

Sample Response

{
    "member": {
        "publicId": "3018443867005700323",
        "displayName": "Adrian Godong",
        "terms": [
            {
                "word": "abal",
                "slug": "abal"
            },
            {
                "word": "Agan",
                "slug": "agan"
            },
            ...
        ]
    }
}