Skip to content

Commit 6773a3f

Browse files
committed
fb
1 parent fb1fcba commit 6773a3f

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

api/OpenAI.net8.0.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class OpenAIClient {
3838
[Experimental("OPENAI001")]
3939
public virtual VectorStoreClient GetVectorStoreClient();
4040
[Experimental("OPENAI001")]
41-
public virtual Videos.VideoClient GetVideoClient();
41+
public virtual VideoClient GetVideoClient();
4242
}
4343
public class OpenAIClientOptions : ClientPipelineOptions {
4444
public Uri Endpoint { get; set; }
@@ -6837,11 +6837,11 @@ public class VideoClient {
68376837
public virtual Task<ClientResult> CreateVideoRemixAsync(string videoId, BinaryContent content, string contentType, RequestOptions options = null);
68386838
public virtual ClientResult DeleteVideo(string videoId, RequestOptions options = null);
68396839
public virtual Task<ClientResult> DeleteVideoAsync(string videoId, RequestOptions options = null);
6840+
public virtual ClientResult DownloadVideo(string videoId, string variant = null, RequestOptions options = null);
6841+
public virtual Task<ClientResult> DownloadVideoAsync(string videoId, string variant = null, RequestOptions options = null);
68406842
public virtual ClientResult GetVideo(string videoId, RequestOptions options = null);
68416843
public virtual Task<ClientResult> GetVideoAsync(string videoId, RequestOptions options = null);
68426844
public virtual ClientResult GetVideos(long? limit = null, string order = null, string after = null, RequestOptions options = null);
68436845
public virtual Task<ClientResult> GetVideosAsync(long? limit = null, string order = null, string after = null, RequestOptions options = null);
6844-
public virtual ClientResult RetrieveVideoContent(string videoId, string variant = null, RequestOptions options = null);
6845-
public virtual Task<ClientResult> RetrieveVideoContentAsync(string videoId, string variant = null, RequestOptions options = null);
68466846
}
68476847
}

api/OpenAI.netstandard2.0.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class OpenAIClient {
2525
public virtual OpenAIResponseClient GetOpenAIResponseClient(string model);
2626
public virtual RealtimeClient GetRealtimeClient();
2727
public virtual VectorStoreClient GetVectorStoreClient();
28-
public virtual Videos.VideoClient GetVideoClient();
28+
public virtual VideoClient GetVideoClient();
2929
}
3030
public class OpenAIClientOptions : ClientPipelineOptions {
3131
public Uri Endpoint { get; set; }
@@ -6026,11 +6026,11 @@ public class VideoClient {
60266026
public virtual Task<ClientResult> CreateVideoRemixAsync(string videoId, BinaryContent content, string contentType, RequestOptions options = null);
60276027
public virtual ClientResult DeleteVideo(string videoId, RequestOptions options = null);
60286028
public virtual Task<ClientResult> DeleteVideoAsync(string videoId, RequestOptions options = null);
6029+
public virtual ClientResult DownloadVideo(string videoId, string variant = null, RequestOptions options = null);
6030+
public virtual Task<ClientResult> DownloadVideoAsync(string videoId, string variant = null, RequestOptions options = null);
60296031
public virtual ClientResult GetVideo(string videoId, RequestOptions options = null);
60306032
public virtual Task<ClientResult> GetVideoAsync(string videoId, RequestOptions options = null);
60316033
public virtual ClientResult GetVideos(long? limit = null, string order = null, string after = null, RequestOptions options = null);
60326034
public virtual Task<ClientResult> GetVideosAsync(long? limit = null, string order = null, string after = null, RequestOptions options = null);
6033-
public virtual ClientResult RetrieveVideoContent(string videoId, string variant = null, RequestOptions options = null);
6034-
public virtual Task<ClientResult> RetrieveVideoContentAsync(string videoId, string variant = null, RequestOptions options = null);
60356035
}
60366036
}

examples/Videos/Example01_VideoCreation.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
using OpenAI.Videos;
44
using System;
55
using System.ClientModel;
6-
using System.Collections.Generic;
7-
using System.Diagnostics.Contracts;
8-
using System.IO;
96
using System.Net.Http;
107
using System.Text;
118
using System.Text.Json;
12-
using System.Threading.Tasks;
139

1410
namespace OpenAI.Examples;
1511

scripts/Export-Api.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ function Invoke-GenAPI {
272272
$content = $content -creplace "Realtime\.", ""
273273
$content = $content -creplace "Responses\.", ""
274274
$content = $content -creplace "VectorStores\.", ""
275+
$content = $content -creplace "Videos\.", ""
275276

276277
# Remove Diagnostics.DebuggerStepThrough attribute.
277278
$content = $content -creplace ".*Diagnostics.DebuggerStepThrough.*\n", ""

specification/client/videos.client.tsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ using TypeSpec.HttpClient.CSharp;
2121
@@convenientAPI(GetVideo, false);
2222
@@convenientAPI(RetrieveVideoContent, false);
2323
@@convenientAPI(CreateVideoRemix, false);
24+
25+
// Rename method
26+
@@clientName(RetrieveVideoContent, "DownloadVideo");

src/Generated/VideoClient.RestClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ internal virtual PipelineMessage CreateGetVideoRequest(string videoId, RequestOp
7878
return message;
7979
}
8080

81-
internal virtual PipelineMessage CreateRetrieveVideoContentRequest(string videoId, string variant, RequestOptions options)
81+
internal virtual PipelineMessage CreateDownloadVideoRequest(string videoId, string variant, RequestOptions options)
8282
{
8383
ClientUriBuilder uri = new ClientUriBuilder();
8484
uri.Reset(_endpoint);

src/Generated/VideoClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,19 @@ public virtual async Task<ClientResult> GetVideoAsync(string videoId, RequestOpt
8282
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
8383
}
8484

85-
public virtual ClientResult RetrieveVideoContent(string videoId, string variant = default, RequestOptions options = null)
85+
public virtual ClientResult DownloadVideo(string videoId, string variant = default, RequestOptions options = null)
8686
{
8787
Argument.AssertNotNullOrEmpty(videoId, nameof(videoId));
8888

89-
using PipelineMessage message = CreateRetrieveVideoContentRequest(videoId, variant, options);
89+
using PipelineMessage message = CreateDownloadVideoRequest(videoId, variant, options);
9090
return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
9191
}
9292

93-
public virtual async Task<ClientResult> RetrieveVideoContentAsync(string videoId, string variant = default, RequestOptions options = null)
93+
public virtual async Task<ClientResult> DownloadVideoAsync(string videoId, string variant = default, RequestOptions options = null)
9494
{
9595
Argument.AssertNotNullOrEmpty(videoId, nameof(videoId));
9696

97-
using PipelineMessage message = CreateRetrieveVideoContentRequest(videoId, variant, options);
97+
using PipelineMessage message = CreateDownloadVideoRequest(videoId, variant, options);
9898
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
9999
}
100100

tspCodeModel.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131371,14 +131371,14 @@
131371131371
{
131372131372
"$id": "9742",
131373131373
"kind": "basic",
131374-
"name": "RetrieveVideoContent",
131374+
"name": "DownloadVideo",
131375131375
"accessibility": "public",
131376131376
"apiVersions": [],
131377131377
"doc": "Download video content",
131378131378
"summary": "Retrieve video content",
131379131379
"operation": {
131380131380
"$id": "9743",
131381-
"name": "RetrieveVideoContent",
131381+
"name": "DownloadVideo",
131382131382
"resourceName": "OpenAI",
131383131383
"summary": "Retrieve video content",
131384131384
"doc": "Download video content",

0 commit comments

Comments
 (0)