5

I'm developing an app to show all new questions for any tags that user is watching in realtime. So instead of using the REST API, I want to use the WebSocket at: wss://qa.sockets.stackexchange.com.

I'm able to observe for any tag with this action: <siteid>-questions-newest-tag-<tagname>

And (looks like) I can observe as many as I need without limit. But when I send multiple actions for multiple tags, and IF a question has multiple tags of my choice together, The server respond me multiple times for a single question. For example javascript and jquery

My current solution is to keep the id of the responds and remove duplicates locally.

So THE QUESTION IS: Is there a built in way to remove duplicates? Like a unique action to get multiple tags or etc. Just like the original site itself.

-

Pseudo action desired just for more clarification:

<siteid>-questions-newest-any-tags-<tagname>;<tagname>;<tagname> // any

<siteid>-questions-newest-all-tags-<tagname>;<tagname>;<tagname> // all

5

No, there is no such way. The unofficial documentation doesn't list such a method, and if you check which websockets are active on a page showing the search results for [tag X] or [tag Y] you'll see it subscribes to two separate tag feed websockets:

enter image description here

The way you describe is also the way I do it for a system which notifies me of potentially interesting questions across the network.

  • I hope there is a little trick or hidden documentation. I leave it open to see what others have to say. – Mojtaba Hosseini Jul 9 at 11:24
  • by the way, what is that |Questions/ListByTag|295239|6085540|71887|meta.stackexchange.com|1562672333|? can you explain it a bit please? – Mojtaba Hosseini Jul 9 at 11:42
  • 3
    |type of page I'm on|user ID on site|my network ID|reputation|domain|current Unix timestamp| – Glorfindel Jul 9 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .