Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Help Wanted: websocket event datastructure is not documented #430

Open
Psycojoker opened this issue Feb 28, 2019 · 2 comments
Open

Help Wanted: websocket event datastructure is not documented #430

Psycojoker opened this issue Feb 28, 2019 · 2 comments
Labels
Help Wanted Community help wanted

Comments

@Psycojoker
Copy link

Psycojoker commented Feb 28, 2019

Hello,

Mattermost API reference provides a list of event sockets here https://api.mattermost.com/#tag/WebSocket, which is very useful, but doesn't provide any example of the sent data structure which makes development more complicated (I've search the documentation for the event names and couldn't find anything) (my only 2 solutions are to wait for an event, copy/paste it and interfere from that hopping to have all on them one day or to read the source of mattermost)

Would it be possible to had this in the documentation? I can provide the event samples I've already gathered if that makes things easier.

Kind regards,

@tapaswenipathak
Copy link

@Psycojoker can you please write a sample you think should be documented? I am feeling like working on this ticket.

@Psycojoker
Copy link
Author

@tapaswenipathak one simple thing to start would be to give the basic structure of all existing websockets event with an example, a bit like in the github api documentation: https://developer.github.com/v3/activity/events/types/#createevent

Right now you only have a list of event name but absolutely no idea of their structure so you can't write code to handle them until you have at least received one of them to see how they look.

For example this is how the "channel_created" event looks like:

{
    u'broadcast': {
        u'omit_users': None,
        u'channel_id': u'', 
        u'team_id': u'', 
        u'user_id': u'some_id'
    }, 
    u'data': {
        u'channel_id': u'some_id', 
        u'team_id': u'some_id'
    }, 
    u'event': u'channel_created', 
    u'seq': 6
}

What would be even better would be to have documentation explaining what is this event, we it occurs, how you should handle it and some explanations of non-obvious field.

Also I'm sorry, I really don't have the time to do that and I'm not working that much on mattermost API for now :/ (life has changed)

@amyblais amyblais added the Help Wanted Community help wanted label Jun 25, 2019
@cwarnermm cwarnermm changed the title websocket event datastructure is not documented Help Wanted: websocket event datastructure is not documented Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted Community help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants