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 (38 loc) · 1.58 KB

get-online-users-of-channels.md

File metadata and controls

51 lines (38 loc) · 1.58 KB

Get Online Users of Channels

Lists all online users of a channel if the channel's id is provided, otherwise it gets all online users of all channels. It only supports the query parameter for #query-and-fields.

HTTP MethodURLRequires Auth
GET/api/v1/channels.onlineyes

Query Parameters

KeyExample ValueDescription
query{"_id":"5HmCfpoB7jp2uibTC"}See Query Parameter.

Example Call

Without query parameter:

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

With query parameter:

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/channels.online?query={"_id": "5HmCfpoB7jp2uibTC"}

Example Response

{
  "online": [
    {
      "_id": "47cRd58HnWwpqxhaZ",
      "username": "test"
    },
    {
      "_id": "BsxzC22xQ43taWdff",
      "username": "uniqueusername"
    }
  ],
  "success": true
}

Change Log

Version Description
0.52.0 Added