Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:comet:javascript_api [2018/02/17 02:22]
anastation468 [Getting the last messages from channel]
en:comet:javascript_api [2019/12/18 02:05] (current)
Line 144: Line 144:
 ======= Getting a number of subscribers ======= ======= Getting a number of subscribers =======
  
-The function “count_user_in_pipe” can helps to determine a number of subscribes for current channel.+The function “count_user_in_pipe” can help to determine a number of subscribes for current channel.
  
-Also this function has the first argument – name of channel and the second is callback function which holds an answer.+Alsothis function has the first argument – name of channel and the second is callback function which holds an answer.
 <code Javascript>​ <code Javascript>​
 cometApi.count_users_in_pipe("​web_chat_pipe",​ function(res) cometApi.count_users_in_pipe("​web_chat_pipe",​ function(res)
Line 176: Line 176:
 These functions will be called when authorization status will be changing. I.e. at least once an authorization will be successful or unsuccessful when connecting to comet server or while status will be changed. ​ These functions will be called when authorization status will be changing. I.e. at least once an authorization will be successful or unsuccessful when connecting to comet server or while status will be changed. ​
  
-Also you can call the function “isAuthorized” to determine authorization status.+You can also call the function “isAuthorized” to determine authorization status.
 <code JavaScript>​cometApi.isAuthorized()</​code>​ <code JavaScript>​cometApi.isAuthorized()</​code>​
 The function “isAuthorized” may return 3 different values: ​ The function “isAuthorized” may return 3 different values: ​