easiest and cheapest way to check if a channel exists?

8 views
Skip to first unread message

Cliff Meece

unread,
Feb 17, 2011, 10:55:15 AM2/17/11
to Hookbox User Group
I need the ability to create a channel if it doesn't exist, befor the
client subscribes. Initially I thought I could use the rest interface
to get the channel options and check the return status. However,
since this returns a list of subscribers I thought this might not be
the best approach. I expect to have lots of subscribers, so does not
seem to be a good idea for every client to query channel options
first, and get a giant list of subscribers just to test if the channel
exist.

Is there another way to do this? For example, it would be fine if the
create_channel just returned a json error stating the channel exists
instead of raising a python exception.

Thanks,
Cliff

Cliff Meece

unread,
Feb 17, 2011, 11:02:21 AM2/17/11
to Hookbox User Group
hmm, just noticed by entering the rest command manually that it _does_
just give a 'false' json message. The problem is that I am trying to
use the drupal hookbox_api module, and the that module throws an
exception if it gets a 'false' json response.
Reply all
Reply to author
Forward
0 new messages