Skip to content

Commit

Permalink
prefix with package name
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaarbonel committed Oct 24, 2024
1 parent cf6b5a1 commit 442370b
Show file tree
Hide file tree
Showing 22 changed files with 182 additions and 182 deletions.
4 changes: 2 additions & 2 deletions docusaurus/video/docusaurus/docs/api/_common_/broadcast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ call.stop_hls_broadcasting()
<TabItem value="go" label="Golang">

```go
call.StartHLSBroadcasting(ctx, &StartHLSBroadcastingRequest{})
call.StartHLSBroadcasting(ctx, &getstream.StartHLSBroadcastingRequest{})
// to end broadcasting
call.StopHLSBroadcasting(ctx, &StopHLSBroadcastingRequest{})
call.StopHLSBroadcasting(ctx, &getstream.StopHLSBroadcastingRequest{})
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ client.video.update_call_type(
<TabItem value="go" label="Golang">

```go
response, err := client.Video().UpdateCallType(ctx, callTypeName, &UpdateCallTypeRequest{
Settings: &CallSettingsRequest{
Broadcasting: &BroadcastSettingsRequest{
response, err := client.Video().UpdateCallType(ctx, callTypeName, &getstream.UpdateCallTypeRequest{
Settings: &getstream.CallSettingsRequest{
Broadcasting: &getstream.BroadcastSettingsRequest{
Enabled: PtrTo(true),
Rtmp: &RTMPSettingsRequest{
Rtmp: &getstream.RTMPSettingsRequest{
Enabled: PtrTo(true),
Quality: PtrTo("1080p"),
Layout: &LayoutSettingsRequest{
Layout: &getstream.LayoutSettingsRequest{
Name: "spotlight",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ call.send_call_event(user_id=user.id, custom={"render-animation": "balloons"})

```go
// send a custom event to all users watching the call
call.SendCallEvent(ctx, &SendCallEventRequest{
call.SendCallEvent(ctx, &getstream.SendCallEventRequest{
Custom: &map[string]interface{}{
"render-animation": "balloons",
},
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/video/docusaurus/docs/api/_common_/go_live.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ call.go_live(start_hls=True, start_recording=True)
<TabItem value="go" label="Golang">

```go
call.GoLive(ctx, &GoLiveRequest{
call.GoLive(ctx, &getstream.GoLiveRequest{
StartHls: PtrTo(true),
StartRecording: PtrTo(true),
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ call.start_rtmp_broadcasts(
<TabItem value="go" label="Golang">

```go
call.StartRTMPBroadcasts(ctx, &StartRTMPBroadcastsRequest{
Broadcasts: []RTMPBroadcastRequest{
call.StartRTMPBroadcasts(ctx, &getstream.StartRTMPBroadcastsRequest{
Broadcasts: []getstream.RTMPBroadcastRequest{
{
Name: "youtube_channel",
StreamUrl: "rtmps://x.rtmps.youtube.com/live2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ call.stop_all_rtmp_broadcasts()
<TabItem value="go" label="Golang">

```go
call.StopAllRTMPBroadcasts(ctx, &StopAllRTMPBroadcastsRequest{})
call.StopAllRTMPBroadcasts(ctx, &getstream.StopAllRTMPBroadcastsRequest{})
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ call.stop_rtmp_broadcast(name='youtube_channel')
<TabItem value="go" label="Golang">

```go
call.StopRTMPBroadcast(ctx, "youtube_channel", &StopRTMPBroadcastsRequest{})
call.StopRTMPBroadcast(ctx, "youtube_channel", &getstream.StopRTMPBroadcastsRequest{})
```

</TabItem>
Expand Down
6 changes: 3 additions & 3 deletions docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ print(rtmp_url, stream_key)
```go
call := client.Video().Call("default", uuid.New().String())
// create the call where the RTMP will be sent to
response, err := call.GetOrCreate(ctx, &GetOrCreateCallRequest{})
response, err := call.GetOrCreate(ctx, &getstream.GetOrCreateCallRequest{})

// ensure we have a user for the host to send video via RTMP
client.UpdateUsers(ctx, &UpdateUsersRequest{
Users: map[string]UserRequest{
client.UpdateUsers(ctx, &getstream.UpdateUsersRequest{
Users: map[string]getstream.UserRequest{
"tommaso-the-host": {
ID: "tommaso-the-host",
},
Expand Down
20 changes: 10 additions & 10 deletions docusaurus/video/docusaurus/docs/api/_common_/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ client.video.update_call_type(name='allhands', external_storage='my-s3')
```go
// 1. create a new storage with all the required parameters

client.CreateExternalStorage(ctx, &CreateExternalStorageRequest{
client.CreateExternalStorage(ctx, &getstream.CreateExternalStorageRequest{
Name: "my-s3",
StorageType: "s3",
Bucket: "my-bucket",
Path: PtrTo("directory_name/"),
AwsS3: &S3Request{
AwsS3: &getstream.S3Request{
S3Region: "us-east-1",
S3ApiKey: PtrTo("my-access"),
S3Secret: PtrTo("my-secret"),
Expand All @@ -99,10 +99,10 @@ client.CreateExternalStorage(ctx, &CreateExternalStorageRequest{

// 2. (Optional) Check storage configuration for correctness
// In case of any errors, this will throw a StreamAPIException.
response, err := client.CheckExternalStorage(ctx, "my-s3", &CheckExternalStorageRequest{})
response, err := client.CheckExternalStorage(ctx, "my-s3", &getstream.CheckExternalStorageRequest{})

// 3. update the call type to use the new storage
client.Video().UpdateCallType(ctx, "allhands", &UpdateCallTypeRequest{
client.Video().UpdateCallType(ctx, "allhands", &getstream.UpdateCallTypeRequest{
ExternalStorage: PtrTo("my-s3"),
})
```
Expand Down Expand Up @@ -224,17 +224,17 @@ call.start_recording(recording_external_storage="my-storage")

```go
// update the call type to use Stream S3 storage for recordings
client.Video().UpdateCallType(ctx, "my-call-type", &UpdateCallTypeRequest{
client.Video().UpdateCallType(ctx, "my-call-type", &getstream.UpdateCallTypeRequest{
ExternalStorage: PtrTo("stream-s3"),
})

// specify my-storage storage when starting call transcribing
call.StartTranscription(ctx, &StartTranscriptionRequest{
call.StartTranscription(ctx, &getstream.StartTranscriptionRequest{
TranscriptionExternalStorage: PtrTo("my-storage"),
})

// specify my-storage storage for recording
call.StartRecording(ctx, &StartRecordingRequest{
call.StartRecording(ctx, &getstream.StartRecordingRequest{
RecordingExternalStorage: PtrTo("my-storage"),
})
```
Expand Down Expand Up @@ -378,7 +378,7 @@ if err != nil {
log.Fatal(err)
}

client.CreateExternalStorage(ctx, &CreateExternalStorageRequest{
client.CreateExternalStorage(ctx, &getstream.CreateExternalStorageRequest{
Name: "my-gcs",
StorageType: "gcs",
Bucket: "my-bucket",
Expand Down Expand Up @@ -488,12 +488,12 @@ client.create_external_storage(
<TabItem value="go" label="Golang">

```go
client.CreateExternalStorage(ctx, &CreateExternalStorageRequest{
client.CreateExternalStorage(ctx, &getstream.CreateExternalStorageRequest{
Name: "my-abs",
StorageType: "abs",
Bucket: "my-bucket",
Path: PtrTo("directory_name/"),
AzureBlob: &AzureRequest{
AzureBlob: &getstream.AzureRequest{
AbsAccountName: "...",
AbsClientID: "...",
AbsClientSecret: "...",
Expand Down
72 changes: 36 additions & 36 deletions docusaurus/video/docusaurus/docs/api/basics/calls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ call.get_or_create(
<TabItem value="go" label="Golang">

```go
call.GetOrCreate(ctx, &GetOrCreateCallRequest{
call.GetOrCreate(ctx, &getstream.GetOrCreateCallRequest{
Ring: PtrTo(true),
Data: &CallRequest{
Data: &getstream.CallRequest{
CreatedByID: PtrTo("myself"),
Members: []MemberRequest{
Members: []getstream.MemberRequest{
{UserID: "myself"},
{UserID: "my friend"},
},
Expand Down Expand Up @@ -139,7 +139,7 @@ call.GetOrCreate(ctx, &GetOrCreateCallRequest{
Notify: PtrTo(true),
Data: &CallRequest{
CreatedByID: PtrTo("myself"),
Members: []MemberRequest{
Members: []getstream.MemberRequest{
{UserID: "myself"},
{UserID: "my friend"},
},
Expand Down Expand Up @@ -245,7 +245,7 @@ response = client.video.update_call_type(
<TabItem value="go" label="Golang">

```go
response, err := client.Video().UpdateCallType(ctx, "default", &UpdateCallTypeRequest{
response, err := client.Video().UpdateCallType(ctx, "default", &getstream.UpdateCallTypeRequest{
Grants: &map[string][]string{
"user": []string{},
"call_member": []string{
Expand Down Expand Up @@ -337,7 +337,7 @@ call.end()
<TabItem value="go" label="Golang">

```go
call.End(ctx, &EndCallRequest{})
call.End(ctx, &getstream.EndCallRequest{})
```

</TabItem>
Expand Down Expand Up @@ -424,11 +424,11 @@ client.query_calls(

```go
// default sorting
client.Video().QueryCalls(ctx, &QueryCallsRequest{})
client.Video().QueryCalls(ctx, &getstream.QueryCallsRequest{})

// sorting and pagination
response, err := client.Video().QueryCalls(ctx, &QueryCallsRequest{
Sort: []*SortParamRequest{&SortParamRequest{
response, err := client.Video().QueryCalls(ctx, &getstream.QueryCallsRequest{
Sort: []*getstream.SortParamRequest{&getstream.SortParamRequest{
Field: PtrTo("starts_at"),
Direction: PtrTo(-1),
}
Expand All @@ -438,8 +438,8 @@ response, err := client.Video().QueryCalls(ctx, &QueryCallsRequest{
)

// loading next page
client.Video().QueryCalls(ctx, &QueryCallsRequest{
Sort: []*SortParamRequest{&SortParamRequest{
client.Video().QueryCalls(ctx, &getstream.QueryCallsRequest{
Sort: []*getstream.SortParamRequest{&getstream.SortParamRequest{
Field: PtrTo("starts_at"),
Direction: PtrTo(-1),
}
Expand Down Expand Up @@ -498,7 +498,7 @@ client.video.query_calls(
<TabItem value="go" label="Golang">

```go
client.Video().QueryCalls(ctx, &QueryCallsRequest{
client.Video().QueryCalls(ctx, &getstream.QueryCallsRequest{
FilterConditions: &map[string]interface{}{
"backstage": false,
},
Expand Down Expand Up @@ -556,7 +556,7 @@ client.video.query_calls(
```go
// in next 30 minutes
inNext30Mins := time.Now().Add(30 * time.Minute)
client.Video().QueryCalls(ctx, &QueryCallsRequest{
client.Video().QueryCalls(ctx, &getstream.QueryCallsRequest{
FilterConditions: &map[string]interface{}{
"starts_at": inNext30Mins.Format(time.RFC3339),
},
Expand Down Expand Up @@ -604,7 +604,7 @@ client.video.query_calls(
<TabItem value="go" label="Golang">

```go
client.Video().QueryCalls(ctx, &QueryCallsRequest{
client.Video().QueryCalls(ctx, &getstream.QueryCallsRequest{
FilterConditions: &map[string]interface{}{
"ongoing": true,
},
Expand Down Expand Up @@ -701,11 +701,11 @@ call.query_members(

```go
// default sorting
client.Video().QueryCallMembers(ctx, &QueryCallMembersRequest{})
client.Video().QueryCallMembers(ctx, &getstream.QueryCallMembersRequest{})

// sorting and pagination
response, err := client.Video().QueryCallMembers(ctx, &QueryCallMembersRequest{
Sort: []*SortParamRequest{&SortParamRequest{
response, err := client.Video().QueryCallMembers(ctx, &getstream.QueryCallMembersRequest{
Sort: []*getstream.SortParamRequest{&getstream.SortParamRequest{
Field: PtrTo("user_id"),
Direction: PtrTo(1),
},
Expand All @@ -715,8 +715,8 @@ response, err := client.Video().QueryCallMembers(ctx, &QueryCallMembersRequest{
)

// loading next page
client.Video().QueryCallMembers(ctx, &QueryCallMembersRequest{
Sort: []*SortParamRequest{&SortParamRequest{
client.Video().QueryCallMembers(ctx, &getstream.QueryCallMembersRequest{
Sort: []*getstream.SortParamRequest{&getstream.SortParamRequest{
Field: PtrTo("user_id"),
Direction: PtrTo(1),
},
Expand All @@ -726,7 +726,7 @@ client.Video().QueryCallMembers(ctx, &QueryCallMembersRequest{
})

// filtering
client.Video().QueryCallMembers(ctx, &QueryCallMembersRequest{
client.Video().QueryCallMembers(ctx, &getstream.QueryCallMembersRequest{
FilterConditions: &map[string]interface{}{
"role": "admin",
},
Expand Down Expand Up @@ -866,13 +866,13 @@ call.video_unpin(session_id="session-id", user_id="user-id-to-unpin")

```go
// Pin video for all participants
call.VideoPin(ctx, &PinRequest{
call.VideoPin(ctx, &getstream.PinRequest{
SessionID: "session-id",
UserID: "user-id-to-pin",
})

// Unpin video for all participants
call.VideoUnpin(ctx, &UnpinRequest{
call.VideoUnpin(ctx, &getstream.UnpinRequest{
SessionID: "session-id",
UserID: "user-id-to-unpin",
})
Expand Down Expand Up @@ -989,7 +989,7 @@ client.video.update_call_type(

```go
// Set default max duration to 1 hour
client.Video().UpdateCallType(ctx, "default", &UpdateCallTypeRequest{
client.Video().UpdateCallType(ctx, "default", &getstream.UpdateCallTypeRequest{
Settings: &CallSettingsRequest{
Limits: &LimitsSettingsRequest{
MaxDurationSeconds: PtrTo(3600),
Expand All @@ -998,9 +998,9 @@ client.Video().UpdateCallType(ctx, "default", &UpdateCallTypeRequest{
})

// Disable the default session timer
client.Video().UpdateCallType(ctx, "default", &UpdateCallTypeRequest{
Settings: &CallSettingsRequest{
Limits: &LimitsSettingsRequest{
client.Video().UpdateCallType(ctx, "default", &getstream.UpdateCallTypeRequest{
Settings: &getstream.CallSettingsRequest{
Limits: &getstream.LimitsSettingsRequest{
MaxDurationSeconds: PtrTo(0),
},
},
Expand Down Expand Up @@ -1110,11 +1110,11 @@ call.get_or_create(
<TabItem value="go" label="Golang">

```go
call.GetOrCreate(ctx, &GetOrCreateCallRequest{
Data: &CallRequest{
call.GetOrCreate(ctx, &getstream.GetOrCreateCallRequest{
Data: &getstream.CallRequest{
CreatedByID: PtrTo("john"),
SettingsOverride: &CallSettingsRequest{
Limits: &LimitsSettingsRequest{
SettingsOverride: &getstream.CallSettingsRequest{
Limits: &getstream.LimitsSettingsRequest{
MaxDurationSeconds: PtrTo(3600),
},
},
Expand Down Expand Up @@ -1210,18 +1210,18 @@ call.update(

```go
// Updates a call with session timer
call.Update(ctx, &UpdateCallRequest{
SettingsOverride: &CallSettingsRequest{
Limits: &LimitsSettingsRequest{
call.Update(ctx, &getstream.UpdateCallRequest{
SettingsOverride: &getstream.CallSettingsRequest{
Limits: &getstream.LimitsSettingsRequest{
MaxDurationSeconds: PtrTo(3600),
},
},
})

// Disable the session timer
call.Update(ctx, &UpdateCallRequest{
SettingsOverride: &CallSettingsRequest{
Limits: &LimitsSettingsRequest{
call.Update(ctx, &getstream.UpdateCallRequest{
SettingsOverride: &getstream.CallSettingsRequest{
Limits: &getstream.LimitsSettingsRequest{
MaxDurationSeconds: PtrTo(0),
},
},
Expand Down
Loading

0 comments on commit 442370b

Please sign in to comment.