-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into call-tokens-docs
- Loading branch information
Showing
24 changed files
with
560 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
docusaurus/video/docusaurus/docs/api/_common_/call-types-overview.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Call types provide sensible default settings for different use-cases. We provide the following types out of the box: | ||
|
||
- **Default** (`default`) for 1:1 or group calls that use both video and audio | ||
- **Livestreaming** (`livestream`) to build ultra low latency livestreaming for your app on our global edge network. Broadcast from your phone or RTMP and scale to millions of participants. | ||
- **Audio room** (`audio_room`) to build audio experiences for your app. You can build basic calling or feature rich experience like Twitter spaces. Audio quality, reliability and scalability is far ahead of competing solutions. | ||
|
||
Each of our [SDKs have tutorials specific for each call type](https://getstream.io/video/sdk/). If you want to know the default settings for each of the call types check out the [Built-in call types page](/api/call_types/builtin). | ||
|
||
It's possible to tweak the built-in call types or create new ones. |
81 changes: 81 additions & 0 deletions
81
docusaurus/video/docusaurus/docs/api/_common_/deactivate-reactivate.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
<Tabs groupId="examples"> | ||
<TabItem value="js" label="JavaScript"> | ||
|
||
```js | ||
client.deactivateUser({ | ||
user_id: '<id>', | ||
}); | ||
|
||
//reactivate | ||
client.reactivateUsers({ | ||
user_ids: ['<id>'], | ||
}); | ||
|
||
// deactivativating users in bulk can take some time | ||
const deactivateResponse = client.deactivateUsers({ | ||
user_ids: ['<id1>', '<id2>'...], | ||
}); | ||
|
||
// you need to poll this endpoint | ||
const taskResponse = await client.getTaskStatus({id: deactivateResponse.task_id}) | ||
|
||
console.log(taskResponse.status === 'completed'); | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="py" label="Python"> | ||
|
||
```py | ||
# deactivate one user | ||
client.deactivate_user(user_id=alice.id) | ||
|
||
# reactivates the user | ||
client.reactivate_user(user_id=alice.id) | ||
|
||
# deactivates users in bulk, this is an async operation | ||
response = client.deactivate_users(user_ids=[alice.id, bob.id]) | ||
task_id = response.data.task_id | ||
|
||
# get information about the task | ||
task_status = client.get_task(task_id) | ||
|
||
# just an example, in reality it can take a few seconds for a task to be processed | ||
if task_status.data.status == "completed": | ||
print(task_status.data.result) | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="curl" label="cURL"> | ||
|
||
```bash | ||
# Deactivate users | ||
curl -X POST https://video.stream-io-api.com/api/v2/users/deactivate?api_key=${API_KEY} \ | ||
-H "Authorization: ${TOKEN}" \ | ||
-H "stream-auth-type: jwt" \ | ||
-H "Content-Type: application/json" \ | ||
-d '{ | ||
"user_ids": ["sara"] | ||
}' | ||
|
||
# Reactivate users | ||
curl -X POST https://video.stream-io-api.com/api/v2/users/deactivate?api_key=${API_KEY} \ | ||
-H "Authorization: ${TOKEN}" \ | ||
-H "stream-auth-type: jwt" \ | ||
-H "Content-Type: application/json" \ | ||
-d '{ | ||
"user_ids": ["sara"] | ||
}' | ||
|
||
# Reactivate users in bulk can take some time, you can poll task status using the task id from the response | ||
# When finished, task status will be completed | ||
curl -X GET https://video.stream-io-api.com/api/v2/tasks/${TASK_ID}?api_key=${API_KEY} \ | ||
-H "Authorization: ${TOKEN}" \ | ||
-H "stream-auth-type: jwt" | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.