Skip to content

Latest commit

 

History

History
83 lines (70 loc) · 2.3 KB

File metadata and controls

83 lines (70 loc) · 2.3 KB

Channel List Joined

Lists all of the channels the calling user has joined. It supports the #pagination parameters, alongside the field parameter for #query-and-fields.

URL Requires Auth HTTP Method
/api/v1/channels.list.joined yes GET

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     https://localhost:3000/api/v1/channels.list.joined

Example Result

{
    "channels": [
        {
            "_id": "ByehQjC44FwMeiLbX",
            "name": "invite-me",
            "t": "c",
            "usernames": [
                "testing1"
            ],
            "msgs": 0,
            "u": {
                "_id": "aobEdbYhXfu5hkeqG",
                "username": "testing1"
            },
            "ts": "2016-12-09T15:08:58.042Z",
            "ro": false,
            "sysMes": true,
            "_updatedAt": "2016-12-09T15:22:40.656Z"
        }
    ],
    "success": true
}

Query Example Call

This example shows a list of Direct Messages' Rooms filtered by "customFields.field1" ended with "5" using a regular expression.

curl -H "X-Auth-Token: OKoJelLu8rYtbyc3c5YtTwxIE-UvT1FzWv9cdq1XPI1" \
     -H "X-User-Id: hw5DThnhQmxDWnavu" \
     http://localhost:3000/api/v1/channels.list.joined?query=%7B%20%22name%22%3A%20%7B%20%22%24regex%22%3A%20%22al%24%22%20%7D%20%7D

Query Example Result

{
    "channels": [
        {
            "_id": "GENERAL",
            "ts": "2018-01-21T20:58:41.142Z",
            "t": "c",
            "name": "general",
            "msgs": 1,
            "default": true,
            "_updatedAt": "2018-01-21T21:03:43.736Z",
            "username": "user2"
        }
    ],
    "offset": 0,
    "count": 1,
    "total": 1,
    "success": true
}

Change Log

Version Description
0.62.0 Add 'query' parameter support.
0.49.0 Count and offset query parameters supported.
0.48.0 Added