package main
import(
livepeergo "github.com/livepeer/livepeer-go"
"context"
"log"
)
func main() {
s := livepeergo.New(
livepeergo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.Room.GetUser(ctx, "<id>", "<value>")
if err != nil {
log.Fatal(err)
}
if res.GetRoomUserResponse != nil {
// handle response
}
}{
"id": "d32ae9e6-c459-4931-9898-e86e2f5e7e16",
"joinedAt": 1687517025261,
"name": "name",
"isPublisher": true,
"metadata": "<string>"
}Livepeer point d’extrémité de l’API Studio
package main
import(
livepeergo "github.com/livepeer/livepeer-go"
"context"
"log"
)
func main() {
s := livepeergo.New(
livepeergo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.Room.GetUser(ctx, "<id>", "<value>")
if err != nil {
log.Fatal(err)
}
if res.GetRoomUserResponse != nil {
// handle response
}
}{
"id": "d32ae9e6-c459-4931-9898-e86e2f5e7e16",
"joinedAt": 1687517025261,
"name": "name",
"isPublisher": true,
"metadata": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Success
The ID of the user
"d32ae9e6-c459-4931-9898-e86e2f5e7e16"
Timestamp (in milliseconds) at which the user joined
1687517025261
The display name of the user
"name"
Whether a user is allowed to publish audio/video tracks
true
User defined payload to store for the participant
Cette page vous a-t-elle été utile ?