Browse Source

Added Userid fields to DataSession and DataSelf JSON documents.

pull/28/head
Simon Eisenmann 11 years ago committed by Simon Eisenmann
parent
commit
1195b39b11
  1. 25
      doc/CHANNELING-API.txt
  2. 6
      src/app/spreed-speakfreely-server/channeling.go

25
doc/CHANNELING-API.txt

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
Spreed Speak Freely Channeling API v1.2.0
Spreed Speak Freely Channeling API v1.3.0
=================================================
(c)2014 struktur AG
@ -85,6 +85,7 @@ Special purpose documents for channling @@ -85,6 +85,7 @@ Special purpose documents for channling
{
"Type": "Self",
"Id": "4",
"Userid": "",
"Token": "some-very-long-string",
"Version": "server-version-number",
"Turn": {
@ -107,7 +108,8 @@ Special purpose documents for channling @@ -107,7 +108,8 @@ Special purpose documents for channling
Keys:
Type : Self (string)
Id : Channel id for this connection (string)
Id : Channel id for this connection (string).
Userid : User id if this session belongs to an authenticated user. Else empty.
Token : Security token (string), to restablish connection with the same
session. Pass the value as URL query parameter t, to the websocket URL.
Version: Server version number. Use this to detect server upgrades.
@ -259,9 +261,7 @@ Additional types for session listing and notifications @@ -259,9 +261,7 @@ Additional types for session listing and notifications
{
"Type": "Left",
"Id": "5",
"Ua": "",
"Status": null
"Id": "5"
}
Joined
@ -269,10 +269,13 @@ Additional types for session listing and notifications @@ -269,10 +269,13 @@ Additional types for session listing and notifications
{
"Type": "Joined",
"Id": "7",
"Userid": "u7",
"Ua": "Chrome 28",
"Status": null
}
Note: The Userid field is only present if that session belongs to a known user.
Status
{
@ -313,26 +316,30 @@ Additional types for session listing and notifications @@ -313,26 +316,30 @@ Additional types for session listing and notifications
{
"Type": "Online",
"Id": "1",
"Ua": "webrtc-publisher",
"Status": null
"Ua": "Firefox 27",
"Status": {...}
},
{
"Type": "Online",
"Id": "3",
"Userid": "u3",
"Ua": "Chrome 28",
"Status": null
"Status": {...}
},
{
"Type": "Online",
"Id": "4",
"Userid": "u4",
"Ua": "Chrome 28",
"Status": null
"Status": {...}
}
],
"Index": 0,
"Batch": 0
}
Note: The Userid field is only present, if that session belongs to a known user.
Alive
{

6
src/app/spreed-speakfreely-server/channeling.go

@ -48,6 +48,7 @@ type DataAnswer struct { @@ -48,6 +48,7 @@ type DataAnswer struct {
type DataSelf struct {
Type string
Id string
Userid string
Token string
Version string
Turn *DataTurn
@ -64,9 +65,10 @@ type DataTurn struct { @@ -64,9 +65,10 @@ type DataTurn struct {
type DataSession struct {
Type string
Id string
Userid string `json:"Userid,omitempty"`
Ua string
Token string
Version string
Token string `json:"Token,omitempty"`
Version string `json:"Version,omitempty"`
Rev uint64
Status interface{}
}

Loading…
Cancel
Save