add hub get logic and part of client
This commit is contained in:
@@ -86,7 +86,9 @@
|
||||
<button data-form="del-connection" class="warn" onclick="showForm('del-connection')">DELETE /connection</button>
|
||||
<button data-form="msg-user" onclick="showForm('msg-user')">POST /connection/message</button>
|
||||
<button data-form="hub-create" onclick="showForm('hub-create')">POST /hub</button>
|
||||
<button data-form="hub-message" onclick="showForm('hub-message')">POST /hub/message</button>
|
||||
<button data-form="hub-join" onclick="showForm('hub-join')">PUT /hub/join</button>
|
||||
<button data-form="get-hubs" onclick="showForm('get-hubs')">GET /hubs</button>
|
||||
<button data-form="websocket" onclick="showForm('websocket')">WS /ws</button>
|
||||
</div>
|
||||
|
||||
@@ -239,6 +241,16 @@
|
||||
<div class="form-actions"><button class="send" onclick="submit('hub-create')">Send</button></div>
|
||||
</div>
|
||||
|
||||
<!-- POST /hub/message -->
|
||||
<div class="form-content" id="fc-hub-message">
|
||||
<div class="field"><label>token</label><input id="hm-token" placeholder=""></div>
|
||||
<div class="field"><label>hubid</label><input id="hm-hubid" placeholder="UUID"></div>
|
||||
<div class="field"><label>channelid</label><input id="hm-channelid" placeholder="UUID"><span class="hint">sent as header</span></div>
|
||||
<div class="field"><label>msgContent</label><input id="hm-msgContent" placeholder="message text (optional if file set)"></div>
|
||||
<div class="field"><label>attachedFile</label><input id="hm-attachedFile" placeholder="key from POST /file (optional)"></div>
|
||||
<div class="form-actions"><button class="send" onclick="submit('hub-message')">Send</button></div>
|
||||
</div>
|
||||
|
||||
<!-- PUT /hub/join -->
|
||||
<div class="form-content" id="fc-hub-join">
|
||||
<div class="field"><label>token</label><input id="hj-token" placeholder=""></div>
|
||||
@@ -246,6 +258,12 @@
|
||||
<div class="form-actions"><button class="send" onclick="submit('hub-join')">Send</button></div>
|
||||
</div>
|
||||
|
||||
<!-- GET /hubs -->
|
||||
<div class="form-content" id="fc-get-hubs">
|
||||
<div class="field"><label>token</label><input id="gh-token" placeholder=""></div>
|
||||
<div class="form-actions"><button class="send" onclick="submit('get-hubs')">Send</button></div>
|
||||
</div>
|
||||
|
||||
<!-- WS /ws -->
|
||||
<div class="form-content" id="fc-websocket">
|
||||
<div class="form-actions" style="margin-bottom:10px">
|
||||
@@ -287,7 +305,9 @@
|
||||
'del-connection': { method:'DELETE', path:'/connection', title:'DELETE /connection — delete a connection', fields:[{id:'dc-token',dest:'header',name:'token'},{id:'dc-connectionid',dest:'query',name:'connectionid'}] },
|
||||
'msg-user': { method:'POST', path:'/connection/message', title:'POST /connection/message — send direct message', fields:[{id:'mu-token',dest:'header',name:'token'},{id:'mu-connectionid',dest:'body',name:'connectionid'},{id:'mu-msgContent',dest:'body',name:'msgContent'},{id:'mu-attachedFile',dest:'body',name:'attachedFile'}] },
|
||||
'hub-create': { method:'POST', path:'/hub', title:'POST /hub — create a new hub', fields:[{id:'hc-token',dest:'header',name:'token'},{id:'hc-hubname',dest:'body',name:'hubname'}] },
|
||||
'hub-message': { method:'POST', path:'/hub/message', title:'POST /hub/message — send hub channel message', fields:[{id:'hm-token',dest:'header',name:'token'},{id:'hm-hubid',dest:'body',name:'hubid'},{id:'hm-channelid',dest:'header',name:'channelid'},{id:'hm-msgContent',dest:'body',name:'msgContent'},{id:'hm-attachedFile',dest:'body',name:'attachedFile'}] },
|
||||
'hub-join': { method:'PUT', path:'/hub/join', title:'PUT /hub/join — join hub (hubid as header)', fields:[{id:'hj-token',dest:'header',name:'token'},{id:'hj-hubid',dest:'header',name:'hubid'}] },
|
||||
'get-hubs': { method:'GET', path:'/hubs', title:'GET /hubs — get own hubs', fields:[{id:'gh-token',dest:'header',name:'token'}] },
|
||||
'mod-user-avatar': { title:'PATCH /user/avatar — set avatar image' },
|
||||
'mod-user-profilebg': { title:'PATCH /user/profilebg — set profile background' },
|
||||
'file-upload': { title:'POST /file — upload file (multipart)' },
|
||||
|
||||
Reference in New Issue
Block a user