The following function will return the following type:
Copy
Ask AI
type Stats = { // How many clients are connected to this channel online_count: number;};
Copy
Ask AI
// Import your Hop SDK instanceimport { hop } from ".";const channelId = "channel_xxx"; // the channel we want to get statistics forconst stats = await hop.channels.getStats(channelId);/* * - stats = { * - "online_count": 0 * - } */