mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-01 12:42:07 +01:00
Update content of files
This commit is contained in:
parent
f5749c0ddb
commit
61b9339682
1 changed files with 37 additions and 31 deletions
|
@ -48,16 +48,22 @@
|
|||
<blockquote>
|
||||
<p>This page describes how should client apps handle Premium features: for a user-friendly overview of Telegram Premium features, see the <a href="https://telegram.org/faq_premium">Telegram Premium FAQ</a>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#telegram-premium-features" id="telegram-premium-features" name="telegram-premium-features"><i class="anchor-icon"></i></a>Telegram Premium features</h3>
|
||||
<h3><a class="anchor" href="#telegram-premium-users" id="telegram-premium-users" name="telegram-premium-users"><i class="anchor-icon"></i></a>Telegram Premium users</h3>
|
||||
<pre><code><a href='/constructor/inputUserSelf'>inputUserSelf</a>#f7c1b13f = <a href='/type/InputUser'>InputUser</a>;
|
||||
|
||||
<a href='/constructor/user'>user</a>#3ff6ecb0 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> bot_attach_menu:flags.27?<a href='/constructor/true'>true</a> premium:flags.28?<a href='/constructor/true'>true</a> attach_menu_enabled:flags.29?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> = <a href='/type/User'>User</a>;
|
||||
|
||||
<a href='/constructor/help.premiumPromo'>help.premiumPromo</a>#8a4f3c29 status_text:<a href='/type/string'>string</a> status_entities:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> video_sections:<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> videos:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Document'>Document</a>> currency:<a href='/type/string'>string</a> monthly_amount:<a href='/type/long'>long</a> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/help.PremiumPromo'>help.PremiumPromo</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/users.getUsers'>users.getUsers</a>#d91a548 id:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> = <a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>>;</code></pre>
|
||||
<a href='/method/users.getUsers'>users.getUsers</a>#d91a548 id:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> = <a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>>;
|
||||
<a href='/method/help.getPremiumPromo'>help.getPremiumPromo</a>#b81b93d4 = <a href='/type/help.PremiumPromo'>help.PremiumPromo</a>;</code></pre>
|
||||
<p>Premium users will have the <code>premium</code> flag of the <a href="/constructor/user">user</a> set. </p>
|
||||
<p>Use <a href="/method/users.getUsers">users.getUsers</a> with <a href="/constructor/inputUserSelf">inputUserSelf</a> to fetch info about the current subscription status of the current user.<br>
|
||||
You can also directly use <a href="/method/help.getPremiumPromo">help.getPremiumPromo</a>, as it will return info about the current user in the <code>users</code> field. </p>
|
||||
<h3><a class="anchor" href="#telegram-premium-features" id="telegram-premium-features" name="telegram-premium-features"><i class="anchor-icon"></i></a>Telegram Premium features</h3>
|
||||
<p>Telegram Premium offers a set of additional features and raised limits: clients should be aware of the current subscription status to accordingly modify client behavior. </p>
|
||||
<p>Use <a href="/method/users.getUsers">users.getUsers</a> with <a href="/constructor/inputUserSelf">inputUserSelf</a> to fetch info about the current subscription status from the <code>premium</code> flag of the returned <a href="/constructor/user">user</a> constructor. </p>
|
||||
<h4><a class="anchor" href="#promo-page" id="promo-page" name="promo-page"><i class="anchor-icon"></i></a>Promo page</h4>
|
||||
<pre><code><a href='/constructor/help.premiumPromo'>help.premiumPromo</a>#8a4f3c29 status_text:<a href='/type/string'>string</a> status_entities:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> video_sections:<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> videos:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Document'>Document</a>> currency:<a href='/type/string'>string</a> monthly_amount:<a href='/type/long'>long</a> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/help.PremiumPromo'>help.PremiumPromo</a>;
|
||||
|
||||
|
@ -68,35 +74,11 @@
|
|||
<p>Clients should show a Telegram Premium button in the settings.<br>
|
||||
Clicking on this button in the settings, clicking on the <a href="#badge">badge</a> of a Premium user or hitting one of the Premium limits listed below should open a Telegram Premium modal. </p>
|
||||
<p>Call <a href="/method/help.getPremiumPromo">help.getPremiumPromo</a> and <a href="/method/help.getAppConfig">help.getAppConfig</a> to fetch info on how to build the premium modal. </p>
|
||||
<p><a href="/method/help.getAppConfig">help.getAppConfig</a> will return a list of Premium <a href="#feature-identifiers">features</a> in the <a href="/api/config#premium-promo-order"><code>premium_promo_order</code> appConfig field</a>, and the modal should contain a row for each <a href="#feature-identifiers">feature identifier</a>. </p>
|
||||
<p>The <a href="/constructor/help.premiumPromo">help.premiumPromo</a> constructor returned by <a href="/method/help.getPremiumPromo">help.getPremiumPromo</a> contains the following fields: </p>
|
||||
<p><a href="/method/help.getAppConfig">help.getAppConfig</a> will return a list of Premium feature identifiers in the <a href="/api/config#premium-promo-order"><code>premium_promo_order</code> appConfig field (array of strings)</a>: the modal should contain a row for each returned feature. </p>
|
||||
<p>Possible feature identifiers:</p>
|
||||
<ul>
|
||||
<li><code>status_text</code>+<code>status_entities</code> - The current subscription status (with associated <a href="/api/entities">styled text entities</a>), to be shown in the modal header. </li>
|
||||
<li><code>video_sections</code>+<code>videos</code> - A list of videos, and the corresponding <a href="#feature-identifiers">premium feature identifiers</a>.<br>
|
||||
Equivalent to a section => video dictionary, with keys from <code>video_section</code> and values from <code>videos</code>.<br>
|
||||
The keys in <code>video_sections</code> correspond to a specific <a href="#feature-identifiers">feature identifier</a>, and the associated promotional video should be shown when clicking on the associated feature row.</li>
|
||||
<li><code>currency</code> - Three-letter ISO 4217 <a href="/bots/payments#supported-currencies">currency</a> code</li>
|
||||
<li><code>monthly_amount</code> - Monthly price of the subscription in the smallest units of the currency (integer, not float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the exp parameter in <a href="/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).</li>
|
||||
</ul>
|
||||
<h5><a class="anchor" href="#feature-identifiers" id="feature-identifiers" name="feature-identifiers"><i class="anchor-icon"></i></a>Feature identifiers</h5>
|
||||
<p>This list contains the feature identifiers returned in the <a href="/api/config#premium-promo-order"><code>premium_promo_order</code> appConfig array field</a>.</p>
|
||||
<p>Note that whenever config keys end with a <code>*</code> in the following list, the <code>*</code> should be replaced with <code>default</code> or <code>premium</code>, to fetch the appropriate limit value for normal and Premium users.</p>
|
||||
<ul>
|
||||
<li><code>double_limits</code> - Clicking on this entry should open a secondary popup with a list of the following improved Premium limits.<br>
|
||||
What follows is a list of <a href="/api/config#client-configuration">appConfig integer config parameters</a>, containing the non-Premium (<code>default</code>) and the Premium (<code>premium</code>) limit. <ul>
|
||||
<li><code>channels_limit_*</code> - The maximum number of <a href="/api/channel">channels and supergroups</a> a user may join</li>
|
||||
<li><code>saved_gifs_limit_*</code> - The maximum number of GIFs a user may save</li>
|
||||
<li><code>stickers_faved_limit_*</code> - The maximum number of stickers a user may <a href="/api/stickers#favorite-stickers">add to favorites »</a></li>
|
||||
<li><code>dialog_filters_limit_*</code> - The maximum number of <a href="/api/folders">folders</a> a user may create</li>
|
||||
<li><code>dialog_filters_chats_*</code> - The maximum number of chats a user may add to a <a href="/api/folders">folder</a></li>
|
||||
<li><code>dialogs_pinned_limit_*</code> - The maximum number of chats a user may pin</li>
|
||||
<li><code>dialogs_folder_pinned_limit_*</code> - The maximum number of chats a user may pin in a folder</li>
|
||||
<li><code>channels_public_limit_*</code> - The maximum number of public <a href="/api/channel">channels or supergroups</a> a user may create</li>
|
||||
<li><code>caption_length_limit_*</code> - The maximum UTF-8 length of media captions</li>
|
||||
<li><code>about_length_limit_*</code> - The maximum UTF-8 length of user bios</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>more_upload</code> - Premium users can upload bigger files, as specified by the <code>upload_max_fileparts_*</code> config keys (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by <code>524288</code>)</li>
|
||||
<li><code>double_limits</code> - Clicking on this entry should open a secondary popup with a list of the <a href="#premium-limits">improved Premium limits »</a>.</li>
|
||||
<li><code>more_upload</code> - Premium users can upload bigger files, as specified by the <a href="/api/config#upload-max-fileparts-default">upload_max_fileparts_default</a> vs <a href="/api/config#upload-max-fileparts-premium"><code>upload_max_fileparts_premium</code></a> config keys.</li>
|
||||
<li><code>faster_download</code> - Premium users have no download speed limits</li>
|
||||
<li><code>voice_to_text</code> - Premium users can <a href="/api/transcribe">transcribe voice messages</a></li>
|
||||
<li><code>no_ads</code> - Premium users see no <a href="/api/sponsored-messages">sponsored messages</a></li>
|
||||
|
@ -108,6 +90,30 @@ What follows is a list of <a href="/api/config#client-configuration">appConfig i
|
|||
<li><code>animated_userpics</code> - <a href="/api/files#animated-profile-pictures">Animated profile pictures</a> of Premium users will play in-chat and when browsing the dialog list</li>
|
||||
<li><code>app_icons</code> - Premium users can change the default icon of the Telegram app</li>
|
||||
</ul>
|
||||
<p>The <a href="/constructor/help.premiumPromo">help.premiumPromo</a> constructor returned by <a href="/method/help.getPremiumPromo">help.getPremiumPromo</a> contains the following fields: </p>
|
||||
<ul>
|
||||
<li><code>status_text</code>+<code>status_entities</code> - The current subscription status (with associated <a href="/api/entities">styled text entities</a>), to be shown in the modal header. </li>
|
||||
<li><code>video_sections</code>+<code>videos</code> - A list of videos, and the corresponding premium feature identifiers
|
||||
Equivalent to a section => video dictionary, with keys from <code>video_section</code> and values from <code>videos</code>.<br>
|
||||
The keys in <code>video_sections</code> correspond to a specific feature identifier, and the associated promotional video should be shown when clicking on the associated feature row.</li>
|
||||
<li><code>currency</code> - Three-letter ISO 4217 <a href="/bots/payments#supported-currencies">currency</a> code</li>
|
||||
<li><code>monthly_amount</code> - Monthly price of the subscription in the smallest units of the currency (integer, not float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the exp parameter in <a href="/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).</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#premium-limits" id="premium-limits" name="premium-limits"><i class="anchor-icon"></i></a>Premium limits</h4>
|
||||
<p>What follows is a list of <a href="/api/config#client-configuration">appConfig integer config parameters</a>. </p>
|
||||
<p>Note that whenever config keys end with a <code>*</code> in the following list, the <code>*</code> should be replaced with <code>default</code> or <code>premium</code>, to fetch the appropriate limit value for normal and Premium users.</p>
|
||||
<ul>
|
||||
<li><code>channels_limit_*</code> - The maximum number of <a href="/api/channel">channels and supergroups</a> a user may join</li>
|
||||
<li><code>saved_gifs_limit_*</code> - The maximum number of GIFs a user may save</li>
|
||||
<li><code>stickers_faved_limit_*</code> - The maximum number of stickers a user may <a href="/api/stickers#favorite-stickers">add to favorites »</a></li>
|
||||
<li><code>dialog_filters_limit_*</code> - The maximum number of <a href="/api/folders">folders</a> a user may create</li>
|
||||
<li><code>dialog_filters_chats_*</code> - The maximum number of chats a user may add to a <a href="/api/folders">folder</a></li>
|
||||
<li><code>dialogs_pinned_limit_*</code> - The maximum number of chats a user may pin</li>
|
||||
<li><code>dialogs_folder_pinned_limit_*</code> - The maximum number of chats a user may pin in a folder</li>
|
||||
<li><code>channels_public_limit_*</code> - The maximum number of public <a href="/api/channel">channels or supergroups</a> a user may create</li>
|
||||
<li><code>caption_length_limit_*</code> - The maximum UTF-8 length of media captions</li>
|
||||
<li><code>about_length_limit_*</code> - The maximum UTF-8 length of user bios</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#badge" id="badge" name="badge"><i class="anchor-icon"></i></a>Badge</h4>
|
||||
<p>Users with a Telegram Premium subscription (<a href="/constructor/user">user</a>.<code>premium</code> is set) should have a Telegram Premium badge next to their name. </p>
|
||||
<h4><a class="anchor" href="#animated-profile-pictures" id="animated-profile-pictures" name="animated-profile-pictures"><i class="anchor-icon"></i></a>Animated profile pictures</h4>
|
||||
|
|
Loading…
Reference in a new issue