mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
adding endpoints for webrtc
This commit is contained in:
parent
aacd546210
commit
9084ca4196
44
doc/api.oa3
44
doc/api.oa3
@ -3649,13 +3649,6 @@ paths:
|
||||
description: account disabled
|
||||
'500':
|
||||
description: internal server error
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
||||
/talk/calls/{callId}:
|
||||
put:
|
||||
@ -3717,6 +3710,42 @@ paths:
|
||||
'500':
|
||||
description: internal server error
|
||||
|
||||
/talk/ring:
|
||||
post:
|
||||
tags:
|
||||
- talk
|
||||
description: Create a ring event in contact
|
||||
operationId: add-ring
|
||||
parameters:
|
||||
- name: contact
|
||||
in: query
|
||||
description: contact token
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: calleeToken
|
||||
in: query
|
||||
description: token for the contact to connect with
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: index
|
||||
in: query
|
||||
description: index of current ring
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
responses:
|
||||
'201':
|
||||
description: entry created
|
||||
'401':
|
||||
description: permission denied
|
||||
'410':
|
||||
description: account disabled
|
||||
'500':
|
||||
description: internal server error
|
||||
|
||||
/talk/signal:
|
||||
get:
|
||||
tags:
|
||||
@ -4589,3 +4618,4 @@ components:
|
||||
type: http
|
||||
scheme: bearer
|
||||
|
||||
|
||||
|
9
net/server/internal/api_addCall.go
Normal file
9
net/server/internal/api_addCall.go
Normal file
@ -0,0 +1,9 @@
|
||||
package databag
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddCall adds an active call with ice signal and relay
|
||||
func AddCall(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
9
net/server/internal/api_addRing.go
Normal file
9
net/server/internal/api_addRing.go
Normal file
@ -0,0 +1,9 @@
|
||||
package databag
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddRing adds ring event from contact
|
||||
func AddRing(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
9
net/server/internal/api_endCall.go
Normal file
9
net/server/internal/api_endCall.go
Normal file
@ -0,0 +1,9 @@
|
||||
package databag
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//EndCall termines an active call
|
||||
func EndCall(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
9
net/server/internal/api_keepCall.go
Normal file
9
net/server/internal/api_keepCall.go
Normal file
@ -0,0 +1,9 @@
|
||||
package databag
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//KeepCall keeps the call alive
|
||||
func KeepCall(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
10
net/server/internal/api_signal.go
Normal file
10
net/server/internal/api_signal.go
Normal file
@ -0,0 +1,10 @@
|
||||
package databag
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//Signal handler for websocket connection with call events
|
||||
func Signal(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
@ -798,9 +798,45 @@ var endpoints = routes{
|
||||
},
|
||||
|
||||
route{
|
||||
"Relay",
|
||||
"Activity",
|
||||
strings.ToUpper("Get"),
|
||||
"/relay",
|
||||
Relay,
|
||||
"/activity",
|
||||
Activity,
|
||||
},
|
||||
|
||||
route{
|
||||
"AddCall",
|
||||
strings.ToUpper("Post"),
|
||||
"/talk/call",
|
||||
AddCall,
|
||||
},
|
||||
|
||||
route{
|
||||
"KeepCall",
|
||||
strings.ToUpper("Put"),
|
||||
"/talk/call/{callId}",
|
||||
KeepCall,
|
||||
},
|
||||
|
||||
route{
|
||||
"EndCall",
|
||||
strings.ToUpper("Delete"),
|
||||
"/talk/call/{callId}",
|
||||
EndCall,
|
||||
},
|
||||
|
||||
route{
|
||||
"AddRing",
|
||||
strings.ToUpper("Post"),
|
||||
"/talk/ring",
|
||||
AddRing,
|
||||
},
|
||||
|
||||
route{
|
||||
"Signal",
|
||||
strings.ToUpper("Get"),
|
||||
"/signal",
|
||||
Signal,
|
||||
},
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user