Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ namespace HeyGen
{
public partial class AssetsClient
{


private static readonly global::HeyGen.EndPointSecurityRequirement s_V1AssetUploadSecurityRequirement0 =
new global::HeyGen.EndPointSecurityRequirement
{
Authorizations = new global::HeyGen.EndPointAuthorizationRequirement[]
{ new global::HeyGen.EndPointAuthorizationRequirement
{
Type = "ApiKey",
Location = "Header",
Name = "X-Api-Key",
FriendlyName = "ApiKeyInHeader",
},
},
};
private static readonly global::HeyGen.EndPointSecurityRequirement[] s_V1AssetUploadSecurityRequirements =
new global::HeyGen.EndPointSecurityRequirement[]
{ s_V1AssetUploadSecurityRequirement0,
};
partial void PrepareV1AssetUploadArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareV1AssetUploadRequest(
Expand All @@ -28,9 +47,15 @@ partial void ProcessV1AssetUploadResponse(
PrepareV1AssetUploadArguments(
httpClient: HttpClient);


var __authorizations = global::HeyGen.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
securityRequirements: s_V1AssetUploadSecurityRequirements,
operationName: "V1AssetUploadAsync");

var __pathBuilder = new global::HeyGen.PathBuilder(
path: "/v1/asset",
baseUri: HttpClient.BaseAddress);
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
Expand All @@ -40,7 +65,7 @@ partial void ProcessV1AssetUploadResponse(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

foreach (var __authorization in Authorizations)
foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
Expand Down
4 changes: 2 additions & 2 deletions src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace HeyGen
{
/// <summary>
/// Upload an image or video asset to your account.<br/>
/// **Reference**: [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1)<br/>
/// **Reference**: [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1).<br/>
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
Expand All @@ -14,7 +14,7 @@ public sealed partial class AssetsClient : global::HeyGen.IAssetsClient, global:
/// <summary>
///
/// </summary>
public const string DefaultBaseUrl = "https://api.heygen.com";
public const string DefaultBaseUrl = "https://api.heygen.com/";

private bool _disposeHttpClient = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ namespace HeyGen
{
public partial class CreateVideoApiClient
{


private static readonly global::HeyGen.EndPointSecurityRequirement s_V1VideoDeleteSecurityRequirement0 =
new global::HeyGen.EndPointSecurityRequirement
{
Authorizations = new global::HeyGen.EndPointAuthorizationRequirement[]
{ new global::HeyGen.EndPointAuthorizationRequirement
{
Type = "ApiKey",
Location = "Header",
Name = "X-Api-Key",
FriendlyName = "ApiKeyInHeader",
},
},
};
private static readonly global::HeyGen.EndPointSecurityRequirement[] s_V1VideoDeleteSecurityRequirements =
new global::HeyGen.EndPointSecurityRequirement[]
{ s_V1VideoDeleteSecurityRequirement0,
};
partial void PrepareV1VideoDeleteArguments(
global::System.Net.Http.HttpClient httpClient,
ref string? videoId);
Expand Down Expand Up @@ -35,12 +54,18 @@ partial void ProcessV1VideoDeleteResponse(
httpClient: HttpClient,
videoId: ref videoId);


var __authorizations = global::HeyGen.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
securityRequirements: s_V1VideoDeleteSecurityRequirements,
operationName: "V1VideoDeleteAsync");

var __pathBuilder = new global::HeyGen.PathBuilder(
path: "/v1/video.delete",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("video_id", videoId)
;
;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Delete,
Expand All @@ -50,7 +75,7 @@ partial void ProcessV1VideoDeleteResponse(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

foreach (var __authorization in Authorizations)
foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ namespace HeyGen
{
public partial class CreateVideoApiClient
{


private static readonly global::HeyGen.EndPointSecurityRequirement s_V2VideoGenerateSecurityRequirement0 =
new global::HeyGen.EndPointSecurityRequirement
{
Authorizations = new global::HeyGen.EndPointAuthorizationRequirement[]
{ new global::HeyGen.EndPointAuthorizationRequirement
{
Type = "ApiKey",
Location = "Header",
Name = "X-Api-Key",
FriendlyName = "ApiKeyInHeader",
},
},
};
private static readonly global::HeyGen.EndPointSecurityRequirement[] s_V2VideoGenerateSecurityRequirements =
new global::HeyGen.EndPointSecurityRequirement[]
{ s_V2VideoGenerateSecurityRequirement0,
};
partial void PrepareV2VideoGenerateArguments(
global::System.Net.Http.HttpClient httpClient,
global::HeyGen.V2VideoGenerateRequest request);
Expand Down Expand Up @@ -37,9 +56,15 @@ partial void ProcessV2VideoGenerateResponse(
httpClient: HttpClient,
request: request);


var __authorizations = global::HeyGen.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
securityRequirements: s_V2VideoGenerateSecurityRequirements,
operationName: "V2VideoGenerateAsync");

var __pathBuilder = new global::HeyGen.PathBuilder(
path: "/v2/video/generate",
baseUri: HttpClient.BaseAddress);
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
Expand All @@ -49,7 +74,7 @@ partial void ProcessV2VideoGenerateResponse(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

foreach (var __authorization in Authorizations)
foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
Expand Down
4 changes: 2 additions & 2 deletions src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace HeyGen
{
/// <summary>
/// Create personalized avatar videos with ease using the **HeyGen API**. By selecting an avatar and a voice, you can create engaging videos for various purposes. 🌟<br/>
/// **Guide**: [https://docs.heygen.com/docs/create-video](https://docs.heygen.com/docs/create-video)**Reference**: [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2)<br/>
/// **Guide**: [https://docs.heygen.com/docs/create-video](https://docs.heygen.com/docs/create-video)**Reference**: [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2).<br/>
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
Expand All @@ -14,7 +14,7 @@ public sealed partial class CreateVideoApiClient : global::HeyGen.ICreateVideoAp
/// <summary>
///
/// </summary>
public const string DefaultBaseUrl = "https://api.heygen.com";
public const string DefaultBaseUrl = "https://api.heygen.com/";

private bool _disposeHttpClient = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@ namespace HeyGen
{
public sealed partial class HeyGenClient
{

/// <inheritdoc/>
public void AuthorizeUsingApiKeyInHeader(
string apiKey)
{
apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey));

Authorizations.Clear();
for (var i = Authorizations.Count - 1; i >= 0; i--)
{
var __authorization = Authorizations[i];
if (__authorization.Type == "ApiKey" &&
__authorization.Location == "Header" &&
__authorization.Name == "X-Api-Key")
{
Authorizations.RemoveAt(i);
}
}

Authorizations.Add(new global::HeyGen.EndPointAuthorization
{
Type = "ApiKey",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace HeyGen
public sealed partial class HeyGenClient
{
/// <inheritdoc cref="HeyGenClient(global::System.Net.Http.HttpClient?, global::System.Uri?, global::System.Collections.Generic.List{global::HeyGen.EndPointAuthorization}?, bool)"/>

public HeyGenClient(
string apiKey,
global::System.Net.Http.HttpClient? httpClient = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ namespace HeyGen
{
public partial class HeyGenClient
{


private static readonly global::HeyGen.EndPointSecurityRequirement s_V1VideoStatusGetSecurityRequirement0 =
new global::HeyGen.EndPointSecurityRequirement
{
Authorizations = new global::HeyGen.EndPointAuthorizationRequirement[]
{ new global::HeyGen.EndPointAuthorizationRequirement
{
Type = "ApiKey",
Location = "Header",
Name = "X-Api-Key",
FriendlyName = "ApiKeyInHeader",
},
},
};
private static readonly global::HeyGen.EndPointSecurityRequirement[] s_V1VideoStatusGetSecurityRequirements =
new global::HeyGen.EndPointSecurityRequirement[]
{ s_V1VideoStatusGetSecurityRequirement0,
};
partial void PrepareV1VideoStatusGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref string? videoId);
Expand Down Expand Up @@ -35,12 +54,18 @@ partial void ProcessV1VideoStatusGetResponse(
httpClient: HttpClient,
videoId: ref videoId);


var __authorizations = global::HeyGen.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
securityRequirements: s_V1VideoStatusGetSecurityRequirements,
operationName: "V1VideoStatusGetAsync");

var __pathBuilder = new global::HeyGen.PathBuilder(
path: "/v1/video_status.get",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("video_id", videoId)
;
;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
Expand All @@ -50,7 +75,7 @@ partial void ProcessV1VideoStatusGetResponse(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

foreach (var __authorization in Authorizations)
foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
Expand Down
Loading