diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs index f29997d..0149feb 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs @@ -43,6 +43,13 @@ partial void ProcessCreateArticleResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs index 1a0e89d..906c2fb 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs @@ -46,6 +46,13 @@ partial void ProcessGetArticleByIdResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs index 554542b..b4e9743 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs @@ -51,6 +51,13 @@ partial void ProcessGetArticleByPathResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs index a033cdf..6643f1e 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs @@ -107,6 +107,13 @@ partial void ProcessGetArticlesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs index 2bc0601..691bfe5 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs @@ -60,6 +60,13 @@ partial void ProcessGetLatestArticlesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs index 94fd58e..46caa19 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs @@ -63,6 +63,13 @@ partial void ProcessGetUserAllArticlesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs index 268a08c..6c44820 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs @@ -62,6 +62,13 @@ partial void ProcessGetUserArticlesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs index b870d6f..b4d5210 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs @@ -62,6 +62,13 @@ partial void ProcessGetUserPublishedArticlesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs index 7302427..f1627e2 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs @@ -62,6 +62,13 @@ partial void ProcessGetUserUnpublishedArticlesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs index 9549e89..3f23901 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs @@ -54,6 +54,13 @@ partial void ProcessUnpublishArticleResponse( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs index 2ed2e0c..9e397aa 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs @@ -48,6 +48,13 @@ partial void ProcessUpdateArticleResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs index 5d4373b..22b1b91 100644 --- a/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs +++ b/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class ArticlesClient : global::Forem.IArticlesClient, glob public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class ArticlesClient : global::Forem.IArticlesClient, glob /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public ArticlesClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs index db513aa..0451ef7 100644 --- a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs +++ b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs @@ -43,6 +43,13 @@ partial void ProcessGetCommentByIdResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs index 743249a..b13b5b9 100644 --- a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs +++ b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs @@ -56,6 +56,13 @@ partial void ProcessGetCommentsByArticleIdResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.CommentsClient.g.cs b/src/libs/Forem/Generated/Forem.CommentsClient.g.cs index f14e54a..70d0923 100644 --- a/src/libs/Forem/Generated/Forem.CommentsClient.g.cs +++ b/src/libs/Forem/Generated/Forem.CommentsClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class CommentsClient : global::Forem.ICommentsClient, glob public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class CommentsClient : global::Forem.ICommentsClient, glob /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public CommentsClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs index 65cf25c..e2ff92a 100644 --- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs +++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs @@ -47,6 +47,13 @@ partial void ProcessCreateDisplayAdsResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs index be5b576..24a354e 100644 --- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs +++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs @@ -41,6 +41,13 @@ partial void ProcessGetDisplayAdsResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsId.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsId.g.cs index 9766f75..d296f59 100644 --- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsId.g.cs +++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsId.g.cs @@ -41,6 +41,13 @@ partial void ProcessGetDisplayAdsIdResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsId.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsId.g.cs index 34db758..e643abd 100644 --- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsId.g.cs +++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsId.g.cs @@ -52,6 +52,13 @@ partial void ProcessPutDisplayAdsIdResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsIdUnpublish.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsIdUnpublish.g.cs index a8545bf..aff56e8 100644 --- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsIdUnpublish.g.cs +++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsIdUnpublish.g.cs @@ -41,6 +41,13 @@ partial void ProcessPutDisplayAdsIdUnpublishResponse( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs index d696411..2379b31 100644 --- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs +++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class DisplayAdsClient : global::Forem.IDisplayAdsClient, public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class DisplayAdsClient : global::Forem.IDisplayAdsClient, /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public DisplayAdsClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs b/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs index 132b26b..2d38d5a 100644 --- a/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs +++ b/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs @@ -41,6 +41,13 @@ partial void ProcessGetFollowedTagsResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs b/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs index b226284..9e83a44 100644 --- a/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs +++ b/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class FollowedTagsClient : global::Forem.IFollowedTagsClie public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class FollowedTagsClient : global::Forem.IFollowedTagsClie /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public FollowedTagsClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs b/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs index 48cae12..cc666d1 100644 --- a/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs +++ b/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs @@ -67,6 +67,13 @@ partial void ProcessGetFollowersResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.FollowersClient.g.cs b/src/libs/Forem/Generated/Forem.FollowersClient.g.cs index 6d7b790..e2476c6 100644 --- a/src/libs/Forem/Generated/Forem.FollowersClient.g.cs +++ b/src/libs/Forem/Generated/Forem.FollowersClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class FollowersClient : global::Forem.IFollowersClient, gl public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class FollowersClient : global::Forem.IFollowersClient, gl /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public FollowersClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.ForemClient.Authorizations..g.cs b/src/libs/Forem/Generated/Forem.ForemClient.Authorizations.ApiKeyInHeader.g.cs similarity index 63% rename from src/libs/Forem/Generated/Forem.ForemClient.Authorizations..g.cs rename to src/libs/Forem/Generated/Forem.ForemClient.Authorizations.ApiKeyInHeader.g.cs index 9621346..006121f 100644 --- a/src/libs/Forem/Generated/Forem.ForemClient.Authorizations..g.cs +++ b/src/libs/Forem/Generated/Forem.ForemClient.Authorizations.ApiKeyInHeader.g.cs @@ -9,12 +9,16 @@ public sealed partial class ForemClient /// Authorize using ApiKey authentication. /// /// - public void AuthorizeUsingApiKey( + public void AuthorizeUsingApiKeyInHeader( string apiKey) { apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); - _httpClient.DefaultRequestHeaders.Add("api-key", apiKey); + _authorization = new global::Forem.EndPointAuthorization + { + Name = "api-key", + Value = apiKey, + }; } } } \ No newline at end of file diff --git a/src/libs/Forem/Generated/Forem.ForemClient.Constructors..g.cs b/src/libs/Forem/Generated/Forem.ForemClient.Constructors..g.cs index ee16bae..ead24bd 100644 --- a/src/libs/Forem/Generated/Forem.ForemClient.Constructors..g.cs +++ b/src/libs/Forem/Generated/Forem.ForemClient.Constructors..g.cs @@ -5,15 +5,16 @@ namespace Forem { public sealed partial class ForemClient { - /// + /// public ForemClient( string apiKey, global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) : this(httpClient, baseUri) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) : this(httpClient, baseUri, authorization) { Authorizing(_httpClient, ref apiKey); - AuthorizeUsingApiKey(apiKey); + AuthorizeUsingApiKeyInHeader(apiKey); Authorized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.ForemClient.g.cs b/src/libs/Forem/Generated/Forem.ForemClient.g.cs index d1d1874..c0a9bf9 100644 --- a/src/libs/Forem/Generated/Forem.ForemClient.g.cs +++ b/src/libs/Forem/Generated/Forem.ForemClient.g.cs @@ -21,6 +21,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -31,7 +32,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public ArticlesClient Articles => new ArticlesClient(_httpClient) + public ArticlesClient Articles => new ArticlesClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -39,7 +40,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public UsersClient Users => new UsersClient(_httpClient) + public UsersClient Users => new UsersClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -47,7 +48,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public CommentsClient Comments => new CommentsClient(_httpClient) + public CommentsClient Comments => new CommentsClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -55,7 +56,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public DisplayAdsClient DisplayAds => new DisplayAdsClient(_httpClient) + public DisplayAdsClient DisplayAds => new DisplayAdsClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -63,7 +64,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public FollowedTagsClient FollowedTags => new FollowedTagsClient(_httpClient) + public FollowedTagsClient FollowedTags => new FollowedTagsClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -71,7 +72,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public TagsClient Tags => new TagsClient(_httpClient) + public TagsClient Tags => new TagsClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -79,7 +80,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public FollowersClient Followers => new FollowersClient(_httpClient) + public FollowersClient Followers => new FollowersClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -87,7 +88,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public OrganizationsClient Organizations => new OrganizationsClient(_httpClient) + public OrganizationsClient Organizations => new OrganizationsClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -95,7 +96,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public PagesClient Pages => new PagesClient(_httpClient) + public PagesClient Pages => new PagesClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -103,7 +104,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public PodcastEpisodesClient PodcastEpisodes => new PodcastEpisodesClient(_httpClient) + public PodcastEpisodesClient PodcastEpisodes => new PodcastEpisodesClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -111,7 +112,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public ProfileImagesClient ProfileImages => new ProfileImagesClient(_httpClient) + public ProfileImagesClient ProfileImages => new ProfileImagesClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -119,7 +120,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public ReactionsClient Reactions => new ReactionsClient(_httpClient) + public ReactionsClient Reactions => new ReactionsClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -127,7 +128,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public ReadinglistClient Readinglist => new ReadinglistClient(_httpClient) + public ReadinglistClient Readinglist => new ReadinglistClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -135,7 +136,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// /// /// - public VideosClient Videos => new VideosClient(_httpClient) + public VideosClient Videos => new VideosClient(_httpClient, authorization: _authorization) { JsonSerializerContext = JsonSerializerContext, }; @@ -146,13 +147,16 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public ForemClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgArticles.g.cs b/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgArticles.g.cs index 749ef1b..6078293 100644 --- a/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgArticles.g.cs +++ b/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgArticles.g.cs @@ -65,6 +65,13 @@ partial void ProcessGetOrgArticlesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgUsers.g.cs b/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgUsers.g.cs index 6b87959..b2d88ff 100644 --- a/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgUsers.g.cs +++ b/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrgUsers.g.cs @@ -65,6 +65,13 @@ partial void ProcessGetOrgUsersResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrganization.g.cs b/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrganization.g.cs index 3925a21..cbc83bb 100644 --- a/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrganization.g.cs +++ b/src/libs/Forem/Generated/Forem.OrganizationsClient.GetOrganization.g.cs @@ -46,6 +46,13 @@ partial void ProcessGetOrganizationResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.OrganizationsClient.g.cs b/src/libs/Forem/Generated/Forem.OrganizationsClient.g.cs index 9d4ff20..1d09e63 100644 --- a/src/libs/Forem/Generated/Forem.OrganizationsClient.g.cs +++ b/src/libs/Forem/Generated/Forem.OrganizationsClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class OrganizationsClient : global::Forem.IOrganizationsCl public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class OrganizationsClient : global::Forem.IOrganizationsCl /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public OrganizationsClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.PagesClient.CreatePages.g.cs b/src/libs/Forem/Generated/Forem.PagesClient.CreatePages.g.cs index bb2a634..caec309 100644 --- a/src/libs/Forem/Generated/Forem.PagesClient.CreatePages.g.cs +++ b/src/libs/Forem/Generated/Forem.PagesClient.CreatePages.g.cs @@ -42,6 +42,13 @@ partial void ProcessCreatePagesResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Forem/Generated/Forem.PagesClient.DeletePagesId.g.cs b/src/libs/Forem/Generated/Forem.PagesClient.DeletePagesId.g.cs index e60ba8f..b27ff36 100644 --- a/src/libs/Forem/Generated/Forem.PagesClient.DeletePagesId.g.cs +++ b/src/libs/Forem/Generated/Forem.PagesClient.DeletePagesId.g.cs @@ -46,6 +46,13 @@ partial void ProcessDeletePagesIdResponseContent( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.PagesClient.GetPages.g.cs b/src/libs/Forem/Generated/Forem.PagesClient.GetPages.g.cs index 2d78113..a9d788b 100644 --- a/src/libs/Forem/Generated/Forem.PagesClient.GetPages.g.cs +++ b/src/libs/Forem/Generated/Forem.PagesClient.GetPages.g.cs @@ -41,6 +41,13 @@ partial void ProcessGetPagesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.PagesClient.GetPagesId.g.cs b/src/libs/Forem/Generated/Forem.PagesClient.GetPagesId.g.cs index 26bc61a..94f9c74 100644 --- a/src/libs/Forem/Generated/Forem.PagesClient.GetPagesId.g.cs +++ b/src/libs/Forem/Generated/Forem.PagesClient.GetPagesId.g.cs @@ -46,6 +46,13 @@ partial void ProcessGetPagesIdResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.PagesClient.PutPagesId.g.cs b/src/libs/Forem/Generated/Forem.PagesClient.PutPagesId.g.cs index d609a53..7582f8a 100644 --- a/src/libs/Forem/Generated/Forem.PagesClient.PutPagesId.g.cs +++ b/src/libs/Forem/Generated/Forem.PagesClient.PutPagesId.g.cs @@ -52,6 +52,13 @@ partial void ProcessPutPagesIdResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Forem/Generated/Forem.PagesClient.g.cs b/src/libs/Forem/Generated/Forem.PagesClient.g.cs index 3578e2b..fb89a9b 100644 --- a/src/libs/Forem/Generated/Forem.PagesClient.g.cs +++ b/src/libs/Forem/Generated/Forem.PagesClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class PagesClient : global::Forem.IPagesClient, global::Sy public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class PagesClient : global::Forem.IPagesClient, global::Sy /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public PagesClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.PathBuilder.g.cs b/src/libs/Forem/Generated/Forem.PathBuilder.g.cs index b7e430e..b0caec3 100644 --- a/src/libs/Forem/Generated/Forem.PathBuilder.g.cs +++ b/src/libs/Forem/Generated/Forem.PathBuilder.g.cs @@ -224,4 +224,20 @@ public PathBuilder AddOptionalParameter( /// The constructed URL. public override string ToString() => _stringBuilder.ToString(); } + + /// + /// + /// + public class EndPointAuthorization + { + /// + /// + /// + public string Name { get; set; } = string.Empty; + + /// + /// + /// + public string Value { get; set; } = string.Empty; + } } \ No newline at end of file diff --git a/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.GetPodcastEpisodes.g.cs b/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.GetPodcastEpisodes.g.cs index 51fac36..5052dd4 100644 --- a/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.GetPodcastEpisodes.g.cs +++ b/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.GetPodcastEpisodes.g.cs @@ -68,6 +68,13 @@ partial void ProcessGetPodcastEpisodesResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.g.cs b/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.g.cs index 482f1c9..8f3d006 100644 --- a/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.g.cs +++ b/src/libs/Forem/Generated/Forem.PodcastEpisodesClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class PodcastEpisodesClient : global::Forem.IPodcastEpisod public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class PodcastEpisodesClient : global::Forem.IPodcastEpisod /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public PodcastEpisodesClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.ProfileImagesClient.GetProfileImage.g.cs b/src/libs/Forem/Generated/Forem.ProfileImagesClient.GetProfileImage.g.cs index b1316df..afa9a18 100644 --- a/src/libs/Forem/Generated/Forem.ProfileImagesClient.GetProfileImage.g.cs +++ b/src/libs/Forem/Generated/Forem.ProfileImagesClient.GetProfileImage.g.cs @@ -47,6 +47,13 @@ partial void ProcessGetProfileImageResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ProfileImagesClient.g.cs b/src/libs/Forem/Generated/Forem.ProfileImagesClient.g.cs index 14b39d2..67b0275 100644 --- a/src/libs/Forem/Generated/Forem.ProfileImagesClient.g.cs +++ b/src/libs/Forem/Generated/Forem.ProfileImagesClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class ProfileImagesClient : global::Forem.IProfileImagesCl public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class ProfileImagesClient : global::Forem.IProfileImagesCl /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public ProfileImagesClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactions.g.cs b/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactions.g.cs index e454b21..6061fca 100644 --- a/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactions.g.cs +++ b/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactions.g.cs @@ -58,6 +58,13 @@ partial void ProcessCreateReactionsResponse( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactionsToggle.g.cs b/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactionsToggle.g.cs index 9e4fd15..119bf9c 100644 --- a/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactionsToggle.g.cs +++ b/src/libs/Forem/Generated/Forem.ReactionsClient.CreateReactionsToggle.g.cs @@ -58,6 +58,13 @@ partial void ProcessCreateReactionsToggleResponse( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ReactionsClient.g.cs b/src/libs/Forem/Generated/Forem.ReactionsClient.g.cs index 4a7292f..24d4f6a 100644 --- a/src/libs/Forem/Generated/Forem.ReactionsClient.g.cs +++ b/src/libs/Forem/Generated/Forem.ReactionsClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class ReactionsClient : global::Forem.IReactionsClient, gl public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class ReactionsClient : global::Forem.IReactionsClient, gl /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public ReactionsClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.ReadinglistClient.GetReadinglist.g.cs b/src/libs/Forem/Generated/Forem.ReadinglistClient.GetReadinglist.g.cs index 2dcbf02..1636c05 100644 --- a/src/libs/Forem/Generated/Forem.ReadinglistClient.GetReadinglist.g.cs +++ b/src/libs/Forem/Generated/Forem.ReadinglistClient.GetReadinglist.g.cs @@ -60,6 +60,13 @@ partial void ProcessGetReadinglistResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.ReadinglistClient.g.cs b/src/libs/Forem/Generated/Forem.ReadinglistClient.g.cs index 438d5b9..1bc1020 100644 --- a/src/libs/Forem/Generated/Forem.ReadinglistClient.g.cs +++ b/src/libs/Forem/Generated/Forem.ReadinglistClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class ReadinglistClient : global::Forem.IReadinglistClient public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class ReadinglistClient : global::Forem.IReadinglistClient /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public ReadinglistClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.TagsClient.GetTags.g.cs b/src/libs/Forem/Generated/Forem.TagsClient.GetTags.g.cs index 4fd471c..6d8b478 100644 --- a/src/libs/Forem/Generated/Forem.TagsClient.GetTags.g.cs +++ b/src/libs/Forem/Generated/Forem.TagsClient.GetTags.g.cs @@ -61,6 +61,13 @@ partial void ProcessGetTagsResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.TagsClient.g.cs b/src/libs/Forem/Generated/Forem.TagsClient.g.cs index 6c9dc5f..4d3cffa 100644 --- a/src/libs/Forem/Generated/Forem.TagsClient.g.cs +++ b/src/libs/Forem/Generated/Forem.TagsClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class TagsClient : global::Forem.ITagsClient, global::Syst public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class TagsClient : global::Forem.ITagsClient, global::Syst /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public TagsClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.UsersClient.GetUser.g.cs b/src/libs/Forem/Generated/Forem.UsersClient.GetUser.g.cs index 8f37c3c..4cfc455 100644 --- a/src/libs/Forem/Generated/Forem.UsersClient.GetUser.g.cs +++ b/src/libs/Forem/Generated/Forem.UsersClient.GetUser.g.cs @@ -48,6 +48,13 @@ partial void ProcessGetUserResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.UsersClient.GetUserMe.g.cs b/src/libs/Forem/Generated/Forem.UsersClient.GetUserMe.g.cs index 6055381..fae8da2 100644 --- a/src/libs/Forem/Generated/Forem.UsersClient.GetUserMe.g.cs +++ b/src/libs/Forem/Generated/Forem.UsersClient.GetUserMe.g.cs @@ -41,6 +41,13 @@ partial void ProcessGetUserMeResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.UsersClient.PostAdminUsersCreate.g.cs b/src/libs/Forem/Generated/Forem.UsersClient.PostAdminUsersCreate.g.cs index 46f4965..6dc4efd 100644 --- a/src/libs/Forem/Generated/Forem.UsersClient.PostAdminUsersCreate.g.cs +++ b/src/libs/Forem/Generated/Forem.UsersClient.PostAdminUsersCreate.g.cs @@ -43,6 +43,13 @@ partial void ProcessPostAdminUsersCreateResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Forem/Generated/Forem.UsersClient.SuspendUser.g.cs b/src/libs/Forem/Generated/Forem.UsersClient.SuspendUser.g.cs index dbfbbb3..9ad42d7 100644 --- a/src/libs/Forem/Generated/Forem.UsersClient.SuspendUser.g.cs +++ b/src/libs/Forem/Generated/Forem.UsersClient.SuspendUser.g.cs @@ -46,6 +46,13 @@ partial void ProcessSuspendUserResponse( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.UsersClient.UnpublishUser.g.cs b/src/libs/Forem/Generated/Forem.UsersClient.UnpublishUser.g.cs index 72d1df6..7954053 100644 --- a/src/libs/Forem/Generated/Forem.UsersClient.UnpublishUser.g.cs +++ b/src/libs/Forem/Generated/Forem.UsersClient.UnpublishUser.g.cs @@ -50,6 +50,13 @@ partial void ProcessUnpublishUserResponse( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.UsersClient.g.cs b/src/libs/Forem/Generated/Forem.UsersClient.g.cs index d9befab..d9f1cd9 100644 --- a/src/libs/Forem/Generated/Forem.UsersClient.g.cs +++ b/src/libs/Forem/Generated/Forem.UsersClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class UsersClient : global::Forem.IUsersClient, global::Sy public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class UsersClient : global::Forem.IUsersClient, global::Sy /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public UsersClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); } diff --git a/src/libs/Forem/Generated/Forem.VideosClient.Videos.g.cs b/src/libs/Forem/Generated/Forem.VideosClient.Videos.g.cs index 6bada11..eec06ee 100644 --- a/src/libs/Forem/Generated/Forem.VideosClient.Videos.g.cs +++ b/src/libs/Forem/Generated/Forem.VideosClient.Videos.g.cs @@ -61,6 +61,13 @@ partial void ProcessVideosResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Forem/Generated/Forem.VideosClient.g.cs b/src/libs/Forem/Generated/Forem.VideosClient.g.cs index 15470b0..e6f7049 100644 --- a/src/libs/Forem/Generated/Forem.VideosClient.g.cs +++ b/src/libs/Forem/Generated/Forem.VideosClient.g.cs @@ -15,6 +15,7 @@ public sealed partial class VideosClient : global::Forem.IVideosClient, global:: public const string BaseUrl = "https://dev.to/api"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Forem.EndPointAuthorization? _authorization; /// /// @@ -28,13 +29,16 @@ public sealed partial class VideosClient : global::Forem.IVideosClient, global:: /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public VideosClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Forem.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); }