docs icon indicating copy to clipboard operation
docs copied to clipboard

Document local client lib channel enumeration in 'channels and messages'

Open SimonWoolf opened this issue 9 years ago • 6 comments

channel enumeration is required by the feature spec (RST2), but currently missing from the documentation

┆Issue is synchronized with this Jira Task by Unito

SimonWoolf avatar May 31 '16 14:05 SimonWoolf

@SimonWoolf I can add the docs, but JS does not support it currently does it without the .all hack, or is that the way it should be done?

mattheworiordan avatar Jun 16 '16 10:06 mattheworiordan

@matthew.oriordan for channel in channels.all is the way it was designed to work, at least.

We can discuss changing it, but I suspect any way of making for channel in channels enumerate only channels is going to be horribly messy. (And TBH I wouldn't even call .all much of a hack, seems a clean enough solution to me -- I know it's not as nice as include Enumerable; def each ... end, but eh, that's javascript for you)

SimonWoolf avatar Jun 17 '16 21:06 SimonWoolf

Replacing in favour of #251

mattheworiordan avatar Mar 08 '17 11:03 mattheworiordan

AFAICS, https://github.com/ably/docs/issues/251 is about the active channel enumeration REST api that's in beta. That's not really anything to do with this issue, which is about RST2 iteration of the local client library Channels object to see what channels the client lib is currently using.

SimonWoolf avatar Apr 04 '18 10:04 SimonWoolf

➤ Mike Clark commented:

Genius asked about (as per linked HubSpot ticket) how to see which channels are subscribed (attached) and the advice was to use channels.all https://github.com/ably/ably-js/blob/fdd5a566eafac0a7fae9592f890361a608794487/src/common/lib/client/realtime.ts#L56 ( https://github.com/ably/ably-js/blob/fdd5a566eafac0a7fae9592f890361a608794487/src/common/lib/client/realtime.ts#L56 )

The relevant information for this is missing on the channels API reference https://ably.com/docs/api/realtime-sdk/channels?lang=javascript#channels-object ( https://ably.com/docs/api/realtime-sdk/channels?lang=javascript#channels-object|smart-link ) which only gives details on two methods (get and release).

I think it would also be relevant to add details on how to use this somewhere in the https://ably.com/docs/channels ( https://ably.com/docs/channels|smart-link ) documentation

Mark Hulbert Making you aware as this caused some confusion with giving the customer accurate / best practice advice

cc Simon Woolf

sync-by-unito[bot] avatar Jan 04 '24 11:01 sync-by-unito[bot]

➤ Mike Clark commented:

This was asked about by a customer on how to see which channels are subscribed (attached) and the advice was to use channels.all https://github.com/ably/ably-js/blob/fdd5a566eafac0a7fae9592f890361a608794487/src/common/lib/client/realtime.ts#L56 ( https://github.com/ably/ably-js/blob/fdd5a566eafac0a7fae9592f890361a608794487/src/common/lib/client/realtime.ts#L56 )

The relevant information for this is missing on the channels API reference https://ably.com/docs/api/realtime-sdk/channels?lang=javascript#channels-object ( https://ably.com/docs/api/realtime-sdk/channels?lang=javascript#channels-object|smart-link ) which only gives details on two methods (get and release).

I think it would also be relevant to add details on how to use this somewhere in the https://ably.com/docs/channels ( https://ably.com/docs/channels|smart-link ) documentation

Mark Hulbert Making you aware as this caused some confusion with giving the customer accurate / best practice advice

cc Simon Woolf

sync-by-unito[bot] avatar Jan 04 '24 11:01 sync-by-unito[bot]