Update content of files

This commit is contained in:
GitHub Action 2024-08-03 13:25:23 +00:00
parent cd1e6b7da1
commit c2bdc3cc6b
6 changed files with 53 additions and 95 deletions

View file

@ -151,6 +151,11 @@
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
<div><pre><code><a href="/constructor/messageActionPaymentRefunded">messageActionPaymentRefunded</a>#41b3e202 flags:<a href="/type/%23">#</a> peer:<a href="/type/Peer">Peer</a> currency:<a href="/type/string">string</a> total_amount:<a href="/type/long">long</a> payload:flags.0?<a href="/type/bytes">bytes</a> charge:<a href="/type/PaymentCharge">PaymentCharge</a> = <a href="/type/MessageAction">MessageAction</a>;<br></code></pre></div>
<h3><a class="anchor" href="#layer-183" id="layer-183" name="layer-183"><i class="anchor-icon"></i></a><a href="/schema?layer=183">Layer 183</a></h3>
<p>This layer adds support for:</p>
<ul>
<li><a href="/method/payments.getStarsTransactionsByID">Fetching info about specific Telegram Star transactions »</a></li>
<li><a href="/api/stars#paying-for-ads-using-telegram-stars">Pay for advertisements using Telegram Stars »</a></li>
</ul>
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
<ul>

View file

@ -48,7 +48,9 @@
<p>This page describes the methods used to buy, use and withdraw <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#rewards-for-content-creators-and-developers">Telegram Stars</a>, as well as view detailed revenue stats and make purchases using Telegram Stars. </p>
<p>Clients should disable Telegram Stars support for the current user if the <a href="/api/config#stars-purchase-blocked">stars_purchase_blocked field is equal to <code>true</code> »</a> due to regional limitations. </p>
<h3><a class="anchor" href="#balance-and-transaction-history" id="balance-and-transaction-history" name="balance-and-transaction-history"><i class="anchor-icon"></i></a>Balance and transaction history</h3>
<pre><code><a href='/constructor/starsTransactionPeerAppStore'>starsTransactionPeerAppStore</a>#b457b375 = <a href='/type/StarsTransactionPeer'>StarsTransactionPeer</a>;
<pre><code><a href='/constructor/inputStarsTransaction'>inputStarsTransaction</a>#206ae6d1 flags:<a href='/type/%23'>#</a> refund:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/string'>string</a> = <a href='/type/InputStarsTransaction'>InputStarsTransaction</a>;
<a href='/constructor/starsTransactionPeerAppStore'>starsTransactionPeerAppStore</a>#b457b375 = <a href='/type/StarsTransactionPeer'>StarsTransactionPeer</a>;
<a href='/constructor/starsTransactionPeerPlayMarket'>starsTransactionPeerPlayMarket</a>#7b560a0b = <a href='/type/StarsTransactionPeer'>StarsTransactionPeer</a>;
<a href='/constructor/starsTransactionPeerPremiumBot'>starsTransactionPeerPremiumBot</a>#250dbaf8 = <a href='/type/StarsTransactionPeer'>StarsTransactionPeer</a>;
<a href='/constructor/starsTransactionPeerFragment'>starsTransactionPeerFragment</a>#e92fd902 = <a href='/type/StarsTransactionPeer'>StarsTransactionPeer</a>;
@ -65,10 +67,13 @@
<a href='/method/payments.getStarsStatus'>payments.getStarsStatus</a>#104fcfa7 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/payments.StarsStatus'>payments.StarsStatus</a>;
<a href='/method/payments.getStarsTransactions'>payments.getStarsTransactions</a>#97938d5a flags:<a href='/type/%23'>#</a> inbound:flags.0?<a href='/constructor/true'>true</a> outbound:flags.1?<a href='/constructor/true'>true</a> ascending:flags.2?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> offset:<a href='/type/string'>string</a> limit:<a href='/type/int'>int</a> = <a href='/type/payments.StarsStatus'>payments.StarsStatus</a>;</code></pre>
<a href='/method/payments.getStarsTransactions'>payments.getStarsTransactions</a>#97938d5a flags:<a href='/type/%23'>#</a> inbound:flags.0?<a href='/constructor/true'>true</a> outbound:flags.1?<a href='/constructor/true'>true</a> ascending:flags.2?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> offset:<a href='/type/string'>string</a> limit:<a href='/type/int'>int</a> = <a href='/type/payments.StarsStatus'>payments.StarsStatus</a>;
<a href='/method/payments.getStarsTransactionsByID'>payments.getStarsTransactionsByID</a>#27842d2e peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputStarsTransaction'>InputStarsTransaction</a>&gt; = <a href='/type/payments.StarsStatus'>payments.StarsStatus</a>;</code></pre>
<p>Use <a href="/method/payments.getStarsStatus">payments.getStarsStatus</a> to get the current stars balance of the current account (with peer=<a href="/constructor/inputPeerSelf">inputPeerSelf</a>), or the stars balance of the bot specified in <code>peer</code>.<br>
The method will also return the last 5 <a href="/constructor/starsTransaction">star transactions »</a>.<br>
To return all <a href="/constructor/starsTransaction">star transactions »</a> (and optionally search using filters), use <a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a>, paginating through the transactions passing the returned <code>next_offset</code> (if set) to <code>offset</code> <a href="/api/offsets">as usual</a>. </p>
<p><a href="/method/payments.getStarsTransactionsByID">payments.getStarsTransactionsByID</a> may be used to fetch info about specific Telegram Star transactions (or refunds) using their IDs, passed as <a href="/constructor/inputStarsTransaction">inputStarsTransaction</a> constructors. </p>
<p>Changes in the star balance (through <a href="#buying-stars">topups</a> or <a href="#using-stars">purchases</a>) will be notified by the server via an <a href="/constructor/updateStarsBalance">updateStarsBalance</a> update.</p>
<h3><a class="anchor" href="#revenue-statistics" id="revenue-statistics" name="revenue-statistics"><i class="anchor-icon"></i></a>Revenue statistics</h3>
<pre><code><a href='/constructor/starsRevenueStatus'>starsRevenueStatus</a>#79342946 flags:<a href='/type/%23'>#</a> withdrawal_enabled:flags.0?<a href='/constructor/true'>true</a> current_balance:<a href='/type/long'>long</a> available_balance:<a href='/type/long'>long</a> overall_revenue:<a href='/type/long'>long</a> next_withdrawal_at:flags.1?<a href='/type/int'>int</a> = <a href='/type/StarsRevenueStatus'>StarsRevenueStatus</a>;
@ -124,7 +129,17 @@ To return all <a href="/constructor/starsTransaction">star transactions »</a> (
<a href='/method/payments.getStarsRevenueWithdrawalUrl'>payments.getStarsRevenueWithdrawalUrl</a>#13bbe8b3 peer:<a href='/type/InputPeer'>InputPeer</a> stars:<a href='/type/long'>long</a> password:<a href='/type/InputCheckPasswordSRP'>InputCheckPasswordSRP</a> = <a href='/type/payments.StarsRevenueWithdrawalUrl'>payments.StarsRevenueWithdrawalUrl</a>;</code></pre>
<p>To withdraw funds from the star balance of a channel or bot we own, invoke <a href="/method/payments.getStarsRevenueWithdrawalUrl">payments.getStarsRevenueWithdrawalUrl</a>, passing the current account's <a href="/api/srp">2FA password</a> as an <a href="/type/InputCheckPasswordSRP">InputCheckPasswordSRP</a> constructor, generated <a href="/api/srp">as specified here »</a>. </p>
<p>Only the channel/bot owner can invoke this method, and only if the balance is bigger than or equal to <a href="/api/config#stars-revenue-withdrawal-min">stars_revenue_withdrawal_min »</a> and the <code>status.withdrawal_enabled</code> flag returned by <a href="/method/payments.getStarsRevenueStats">payments.getStarsRevenueStats</a> is set. </p>
<p>The method will return a unique URL to a <a href="https://fragment.com/">Fragment</a> page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent.</p></div>
<p>The method will return a unique URL to a <a href="https://fragment.com/">Fragment</a> page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent. </p>
<h3><a class="anchor" href="#paying-for-ads-using-telegram-stars" id="paying-for-ads-using-telegram-stars" name="paying-for-ads-using-telegram-stars"><i class="anchor-icon"></i></a>Paying for ads using Telegram Stars</h3>
<pre><code><a href='/constructor/payments.starsRevenueAdsAccountUrl'>payments.starsRevenueAdsAccountUrl</a>#394e7f21 url:<a href='/type/string'>string</a> = <a href='/type/payments.StarsRevenueAdsAccountUrl'>payments.StarsRevenueAdsAccountUrl</a>;
---functions---
<a href='/method/payments.getStarsRevenueAdsAccountUrl'>payments.getStarsRevenueAdsAccountUrl</a>#d1d7efc5 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/payments.StarsRevenueAdsAccountUrl'>payments.StarsRevenueAdsAccountUrl</a>;</code></pre>
<p>Channel/bot owners may place Telegram advertisements for channels/bots they own using the Telegram Ad platform, paying using <strong>Stars</strong> at a special rate with a <strong>30% discount</strong> creating a <strong>cost-effective</strong> way of reaching new users. </p>
<p>To use Stars for ads, go to your bot's or channels' Balance or Monetization section and tap '<em>Buy Ads</em>'.<br>
Clicking on the button should invoke <a href="/method/payments.getStarsRevenueAdsAccountUrl">payments.getStarsRevenueAdsAccountUrl</a> (passing the bot/channel in <code>peer</code>).<br>
The returned <code>url</code> will lead to a page where the user will be able to place ads for the channel/bot passed in <code>peer</code>.</p></div>
</div>

View file

@ -4,38 +4,24 @@
<meta charset="utf-8">
<title>inputStarsTransaction</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
<meta property="description" content="Used to fetch info about a Telegram Star transaction ».
Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
refund
flags.0?true
 
id
string
 
Type
Input…">
Flags, see TL conditional…">
<meta property="og:title" content="inputStarsTransaction">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
<meta property="og:description" content="Used to fetch info about a Telegram Star transaction ».
Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
refund
flags.0?true
 
id
string
 
Type
Input…">
Flags, see TL conditional…">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -70,7 +56,8 @@ Input…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputStarsTransaction" >inputStarsTransaction</a></li></ul></div>
<h1 id="dev_page_title">inputStarsTransaction</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Used to fetch info about a <a href="/api/stars#balance-and-transaction-history">Telegram Star transaction »</a>. </p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 185 <b class="caret"></b></a>
@ -101,12 +88,12 @@ Input…">
<tr>
<td><strong>refund</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td> </td>
<td>If set, fetches info about the refund transaction for this transaction.</td>
</tr>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td> </td>
<td>Transaction ID.</td>
</tr>
</tbody>
</table>

View file

@ -4,26 +4,10 @@
<meta charset="utf-8">
<title>payments.starsRevenueAdsAccountUrl</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
url
string
 
Type
payments.StarsRevenueAdsAccountUrl">
<meta property="description" content="Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.…">
<meta property="og:title" content="payments.starsRevenueAdsAccountUrl">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
url
string
 
Type
payments.StarsRevenueAdsAccountUrl">
<meta property="og:description" content="Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.…">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -58,7 +42,8 @@ payments.StarsRevenueAdsAccountUrl">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/payments.starsRevenueAdsAccountUrl" >payments.starsRevenueAdsAccountUrl</a></li></ul></div>
<h1 id="dev_page_title">payments.starsRevenueAdsAccountUrl</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using <a href="/api/stars#paying-for-ads-using-telegram-stars">Telegram Stars</a>. </p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 185 <b class="caret"></b></a>
@ -84,7 +69,7 @@ payments.StarsRevenueAdsAccountUrl">
<tr>
<td><strong>url</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td> </td>
<td>URL to open.</td>
</tr>
</tbody>
</table>

View file

@ -4,34 +4,10 @@
<meta charset="utf-8">
<title>payments.getStarsRevenueAdsAccountUrl</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
peer
InputPeer
 
Result
payments.StarsRevenueAdsAccountUrl
Possible errors
Code
Type
Description…">
<meta property="description" content="Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid…">
<meta property="og:title" content="payments.getStarsRevenueAdsAccountUrl">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
peer
InputPeer
 
Result
payments.StarsRevenueAdsAccountUrl
Possible errors
Code
Type
Description…">
<meta property="og:description" content="Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid…">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -66,7 +42,8 @@ Description…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/payments.getStarsRevenueAdsAccountUrl" >payments.getStarsRevenueAdsAccountUrl</a></li></ul></div>
<h1 id="dev_page_title">payments.getStarsRevenueAdsAccountUrl</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in <code>peer</code>, paid using the Telegram Stars owned by the specified <code>peer</code>, see <a href="/api/stars#paying-for-ads-using-telegram-stars">here »</a> for more info. </p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 185 <b class="caret"></b></a>
@ -94,7 +71,7 @@ Description…">
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
<td> </td>
<td>Channel or bot that owns the stars.</td>
</tr>
</tbody>
</table>

View file

@ -4,34 +4,22 @@
<meta charset="utf-8">
<title>payments.getStarsTransactionsByID</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
<meta property="description" content="Obtain info about Telegram Star transactions » using specific transaction IDs.
Parameters
Name
Type
Description
peer
InputPeer
 
id
Vector&lt;InputStarsTransaction&gt;
 
Result
payments.StarsStatus
Possible…">
InputPeer…">
<meta property="og:title" content="payments.getStarsTransactionsByID">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
<meta property="og:description" content="Obtain info about Telegram Star transactions » using specific transaction IDs.
Parameters
Name
Type
Description
peer
InputPeer
 
id
Vector&lt;InputStarsTransaction&gt;
 
Result
payments.StarsStatus
Possible…">
InputPeer…">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -66,7 +54,8 @@ Possible…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/payments.getStarsTransactionsByID" >payments.getStarsTransactionsByID</a></li></ul></div>
<h1 id="dev_page_title">payments.getStarsTransactionsByID</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Obtain info about <a href="/api/stars#balance-and-transaction-history">Telegram Star transactions »</a> using specific transaction IDs.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 185 <b class="caret"></b></a>
@ -94,12 +83,12 @@ Possible…">
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
<td> </td>
<td>Channel or bot.</td>
</tr>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/InputStarsTransaction">InputStarsTransaction</a>&gt;</td>
<td> </td>
<td>Transaction IDs.</td>
</tr>
</tbody>
</table>