Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
51 lines (42 loc) · 1.47 KB

spotlight-search.md

File metadata and controls

51 lines (42 loc) · 1.47 KB

Spotlight (search)

Search for rooms or users.

Name Requires Auth Permission Setting
spotlight Yes

Payload Parameters

Argument Example Required Description
searchString test Required The term to be searched for.
exclude test.rc Optional Any items to exclude from the results (e.g. users you already know about)
options { "users": true, "rooms": false } Required What kinds of fields to search for

Example Call

{
    "msg": "method",
    "method": "spotlight",
    "params": ["test", ["testrc"], {
        "users": true,
        "rooms": false
    }],
    "id": "74290"
}

Example Response

{
    "msg": "result",
    "id": "74290",
    "result": {
        "users": [
            {
                "_id": "ZoJM4tvohREwJbtAh",
                "username": "testrc",
                "status": "offline",
                "name": "TestRc",
                "outside": true
            }
        ],
        "rooms": []
    }
}