Skip to content

Commit 58f3921

Browse files
committed
Removed Obsolete *Async methods
1 parent 7412808 commit 58f3921

File tree

5 files changed

+11
-1718
lines changed

5 files changed

+11
-1718
lines changed

src/Telegram.Bot/ITelegramBotClient.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ public interface ITelegramBotClient
4141
/// <returns>Result of the API request</returns>
4242
Task<TResponse> SendRequest<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default);
4343

44-
/// <summary>Method MakeRequest was renamed as <see cref="SendRequest">SendRequest</see></summary>
45-
[Obsolete("Method MakeRequest was renamed as SendRequest")]
46-
Task<TResponse> MakeRequest<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default);
47-
48-
/// <summary>Method MakeRequestAsync was renamed as <see cref="SendRequest">SendRequest</see></summary>
49-
[Obsolete("Method MakeRequestAsync was renamed as SendRequest")]
50-
Task<TResponse> MakeRequestAsync<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default);
51-
5244
/// <summary>Test the API token</summary>
5345
/// <param name="cancellationToken"></param>
5446
/// <returns><see langword="true"/> if token is valid</returns>

src/Telegram.Bot/Requests/Payments/CreateInvoiceLinkRequest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public partial class CreateInvoiceLinkRequest() : RequestBase<string>("createInv
2828
/// <summary>Payment provider token, obtained via <a href="https://t.me/botfather">@BotFather</a>. Pass an empty string for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</summary>
2929
public string? ProviderToken { get; set; }
3030

31+
/// <summary>The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 2500 Telegram Stars.</summary>
32+
public int? SubscriptionPeriod { get; set; }
33+
3134
/// <summary>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <b>not</b> float/double). For example, for a maximum tip of <c>US$ 1.45</c> pass <c><see cref="MaxTipAmount">MaxTipAmount</see> = 145</c>. See the <em>exp</em> parameter in <a href="https://core.telegram.org/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</summary>
3235
public int? MaxTipAmount { get; set; }
3336

@@ -70,9 +73,6 @@ public partial class CreateInvoiceLinkRequest() : RequestBase<string>("createInv
7073
/// <summary>Pass <see langword="true"/> if the final price depends on the shipping method. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</summary>
7174
public bool IsFlexible { get; set; }
7275

73-
/// <summary>The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 2500 Telegram Stars.</summary>
74-
public int? SubscriptionPeriod { get; set; }
75-
7676
/// <summary>Unique identifier of the business connection on behalf of which the link will be created. For payments in <a href="https://t.me/BotNews/90">Telegram Stars</a> only.</summary>
7777
public string? BusinessConnectionId { get; set; }
7878
}

src/Telegram.Bot/TelegramBotClient.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,6 @@ public TelegramBotClient(string token, HttpClient? httpClient = null, Cancellati
9595
: this(new TelegramBotClientOptions(token), httpClient, cancellationToken)
9696
{ }
9797

98-
/// <inheritdoc/>
99-
[Obsolete("Method MakeRequestAsync was renamed as SendRequest")]
100-
public Task<TResponse> MakeRequestAsync<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default)
101-
=> SendRequest(request, cancellationToken);
102-
103-
/// <inheritdoc/>
104-
[Obsolete("Method MakeRequest was renamed as SendRequest")]
105-
public Task<TResponse> MakeRequest<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default)
106-
=> SendRequest(request, cancellationToken);
107-
10898
/// <inheritdoc/>
10999
public virtual async Task<TResponse> SendRequest<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default)
110100
{

0 commit comments

Comments
 (0)