Skip to content

Commit

Permalink
manage types
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaarbonel committed Sep 19, 2024
1 parent 5f0afa9 commit 2d3ade3
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docusaurus/video/docusaurus/docs/api/call_types/manage-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ client.video.list_call_types()
client.get_call_type(name= 'livestream')
```

</TabItem>
<TabItem value="go" label="Golang">

```go
client.Video().ListCallTypes(ctx)

// or
client.Video().GetCallType(ctx, "livestream")
```

</TabItem>

<TabItem value="curl" label="cURL">
Expand Down Expand Up @@ -92,6 +102,26 @@ client.video.create_call_type(

```

</TabItem>
<TabItem value="go" label="Golang">

```go
client.Video().CreateCallType(ctx, &CreateCallTypeRequest{
Name: "allhands",
Settings: &CallSettingsRequest{
Audio: &AudioSettingsRequest{
MicDefaultOn: PtrTo(true),
DefaultDevice: "speaker",
},
},
Grants: &map[string][]string{
"admin": []string{SEND_AUDIO.String(), SEND_VIDEO.String(), MUTE_USERS.String()},
"user": []string{SEND_AUDIO.String(), SEND_VIDEO.String()},
},
})

```

</TabItem>

<TabItem value="curl" label="cURL">
Expand Down Expand Up @@ -142,6 +172,20 @@ client.video.update_call_type(name='allhands',
)
```

</TabItem>
<TabItem value="go" label="Golang">

```go
client.Video().UpdateCallType(ctx, "allhands", &UpdateCallTypeRequest{
Settings: &CallSettingsRequest{
Audio: &AudioSettingsRequest{
MicDefaultOn: PtrTo(false),
DefaultDevice: "earpiece",
},
},
})
```

</TabItem>

<TabItem value="curl" label="cURL">
Expand Down Expand Up @@ -189,6 +233,13 @@ client.video.delete_call_type(name= 'allhands')

```

</TabItem>
<TabItem value="go" label="Golang">

```go
client.Video().DeleteCallType(ctx, "allhands")
```

</TabItem>

<TabItem value="curl" label="cURL">
Expand Down

0 comments on commit 2d3ade3

Please sign in to comment.