Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vagruchi committed Feb 6, 2024
1 parent 603aa4e commit d4e1a81
Showing 1 changed file with 55 additions and 51 deletions.
106 changes: 55 additions & 51 deletions docusaurus/video/docusaurus/docs/api/recording/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Alternatively, you can also have the storage configured and use it for specific

<Tabs groupId="examples">
<TabItem value="js" label="JavaScript">

```js
// 1. create a new storage with all the required parameters

await serverSideClient.createExternalStorage({
bucket: 'my-bucket',
name: 'my-s3',
Expand All @@ -43,17 +43,14 @@ await serverSideClient.createExternalStorage({
s3_secret: 'my-secret',
},
});

// 2. update the call type to use the new storage
await serverSideClient.updateCallType('my-call-type', {
external_storage: "my-s3",
});

// 3. alternative, specify the storage when starting call recording
await call.startRecording({
recording_external_storage: "my-s3",
});

```
</TabItem>
<TabItem value="py" label="Python">
Expand All @@ -62,37 +59,37 @@ await call.startRecording({
```
</TabItem>
<TabItem value="curl" label="cURL">

```bash
curl -X POST \
https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"name": "my-storage",
"storage_type": "s3",
"bucket": "my-bucket",
"custom_folder": "my-folder",
"aws_s3": {
"s3_region": "us-east-1",
"s3_api_key": "my-api-key",
"s3_secret": "my-secret"
}
curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" \
-H "stream-auth-type: jwt" \
-d '{
"name": "my-storage",
"storage_type": "s3",
"bucket": "my-bucket",
"custom_folder": "my-folder",
"aws_s3": {
"s3_region": "us-east-1",
"s3_api_key": "my-api-key",
"s3_secret": "my-secret"
}
}'


curl -X PATCH \
https://video.stream-io-api.com/video/call_types/${CALL_TYPE_ID}?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"external_storage": "my-storage"
}'
curl -X PATCH https://video.stream-io-api.com/video/call_types/${CALL_TYPE_ID}?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"external_storage": "my-storage"
}'

curl -X POST \
"https://video.stream-io-api.com/video/call/default/${CALL_ID}/start_recording?api_key=${API_KEY}" \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"recording_external_storage": "my-storage"
}'
curl -X POST "https://video.stream-io-api.com/video/call/default/${CALL_ID}/start_recording?api_key=${API_KEY}" \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"recording_external_storage": "my-storage"
}'
```

</TabItem>
</Tabs>

Expand All @@ -112,41 +109,46 @@ Note: all Stream applications have Stream S3 storage enabled by default. You can

<Tabs groupId="examples">
<TabItem value="js" label="JavaScript">

```js
// TODO: code example for Node
// 1. update the call type to use Stream S3 storage

await serverSideClient.updateCallType('my-call-type', {
external_storage: "my-first-storage",
external_storage: "stream-s3",
});

// 2. specify Stream S3 storage when starting call recording
await call.startRecording({
recording_external_storage: "my-second-storage",
recording_external_storage: "my-storage",
});
```

</TabItem>
<TabItem value="py" label="Python">

```py
# TODO: code example for Python
```

</TabItem>
<TabItem value="curl" label="cURL">

```bash
curl -X PATCH \
https://video.stream-io-api.com/video/call_types/${CALL_TYPE_ID}?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
/// TODO: test current structure
"external_storage": "my-first-storage"
}'

curl -X POST \
"https://video.stream-io-api.com/video/call/default/${CALL_ID}/start_recording?api_key=${API_KEY}" \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"recording_external_storage": "my-second-storage"
}'

curl -X PATCH https://video.stream-io-api.com/video/call_types/${CALL_TYPE_ID}?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" \
-H "stream-auth-type: jwt" \
-d '{
"external_storage": "my-first-storage"
}'

curl -X POST "https://video.stream-io-api.com/video/call/default/${CALL_ID}/start_recording?api_key=${API_KEY}" \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"recording_external_storage": "my-second-storage"
}'
```

</TabItem>
</Tabs>

Expand Down Expand Up @@ -213,6 +215,7 @@ Note: you can find the JSON service account credentials in the Google Cloud Cons
<TabItem value="js" label="JavaScript">
```js
// 1. create a new storage using the service account credentials

await serverSideClient.createExternalStorage({
bucket: 'my-bucket',
name: 'my-gcs',
Expand All @@ -228,12 +231,12 @@ await serverSideClient.createExternalStorage({
```
</TabItem>
<TabItem value="curl" label="cURL">

```bash
curl -X POST \
curl -X POST \
https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{

curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \
-H "Authorization: ${JWT_TOKEN}" -H "stream-auth-type: jwt" \
-d '{
"name": "my-storage",
"storage_type": "gcs",
"bucket": "my-bucket",
Expand All @@ -242,6 +245,7 @@ curl -X POST \
}'

```

</TabItem>
</Tabs>

Expand Down

0 comments on commit d4e1a81

Please sign in to comment.