如何列出所有具有活跃订阅者的 pubnub 频道? [英] How can I list all pubnub channels with active subscribers?

查看:38
本文介绍了如何列出所有具有活跃订阅者的 pubnub 频道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想列出与具有活跃订阅者的订阅密钥相关联的所有频道.有没有办法用pubnub做到这一点?如果这有什么不同,我将使用 JavaScript API.

I'd like to list all channels associated with a subscribe key that have active subscribers. Is there a way to do that with pubnub? I am using the JavaScript API if that makes any difference.

推荐答案

PubNub Where Now API

返回与订阅键相关联的频道列表,其中存在订阅者.

PubNub Where Now API

Return a list of channels, associated with a subscribe key, where subscribers exist.

PUBNUB.where_now( { uuid : 'optional-uuid' }, function(data) {
    console.log(data);
} );

请注意,在本文发布时,where_now() 仅在 +3.6 SDK 版本中可用.

Note at the time of this posting, where_now() is only available in +3.6 SDK versions.

这篇关于如何列出所有具有活跃订阅者的 pubnub 频道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆