mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-03-14 04:51:42 +01:00
Update content of files
This commit is contained in:
parent
a975abd680
commit
727bfbef83
3 changed files with 20 additions and 127 deletions
|
@ -77,7 +77,7 @@
|
|||
<p>After enabling a <a href="#main-mini-apps">main mini app »</a> in <a href="https://t.me/botfather">@botfather</a>, bots gain the ability to display <strong>localized</strong> preview medias (photos and videos) on their profile page, offering examples of what the app can do. </p>
|
||||
<p>If a bot has some preview medias, the <a href="/constructor/botInfo">botInfo</a>.<code>has_preview_medias</code> flag will be set (<a href="/constructor/botInfo">botInfo</a> is contained in the bot's <a href="/constructor/userFull">userFull</a>).<br>
|
||||
Clients should then invoke <a href="/method/bots.getPreviewMedias">bots.getPreviewMedias</a> to fetch&download the preview medias once the user opens the bot's profile page.<br>
|
||||
The method will automatically select the correctly localized variant of each preview, according to the language code of the user (as passed to <a href="/constructor/initConnection">initConnection</a> when first setting up the client). </p>
|
||||
The method will automatically select the correctly localized variant of each preview, according to the language code of the user (as passed to <a href="/method/initConnection">initConnection</a> when first setting up the client). </p>
|
||||
<p>Bot owners may edit the preview medias directly through the API. </p>
|
||||
<p>To check whether the current user can edit the preview medias of a bot, make sure both the <code>bot_can_edit</code> and <code>bot_has_main_app</code> flags of the bot's <a href="/constructor/user">user</a> constructor are set. </p>
|
||||
<p>Then, <a href="/method/bots.getPreviewInfo">bots.getPreviewInfo</a> should be invoked by bot owners to fetch the previously configured preview medias.<br>
|
||||
|
@ -86,6 +86,7 @@ Pass an empty string to <code>lang_code</code> when first invoking the method to
|
|||
<p>Then, use <a href="/method/bots.addPreviewMedia">bots.addPreviewMedia</a>, <a href="/method/bots.editPreviewMedia">bots.editPreviewMedia</a>, <a href="/method/bots.reorderPreviewMedias">bots.reorderPreviewMedias</a>, <a href="/method/bots.deletePreviewMedia">bots.deletePreviewMedia</a>, uploading medias using <a href="/method/messages.uploadMedia">messages.uploadMedia</a> as usual to setup fallback and localized previews for existing and new languages. </p>
|
||||
<p>As specified above, each language can have a distinct set of previews that may be edited and reordered independently.
|
||||
The default, fallback language has an empty <code>lang_code</code>. </p>
|
||||
<p>A maximum of <a href="/api/config#bot-preview-medias-max">bot_preview_medias_max »</a> preview medias may be added per localization key.</p>
|
||||
<h3><a class="anchor" href="#keyboard-button-mini-apps" id="keyboard-button-mini-apps" name="keyboard-button-mini-apps"><i class="anchor-icon"></i></a>Keyboard Button Mini Apps</h3>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/replyKeyboardMarkup'>replyKeyboardMarkup</a>#85dd99d1 flags:<a href='/type/%23'>#</a> resize:flags.0?<a href='/constructor/true'>true</a> single_use:flags.1?<a href='/constructor/true'>true</a> selective:flags.2?<a href='/constructor/true'>true</a> persistent:flags.4?<a href='/constructor/true'>true</a> rows:<a href='/type/Vector%20t'>Vector</a><<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>> placeholder:flags.3?<a href='/type/string'>string</a> = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
|
||||
|
|
|
@ -89,19 +89,29 @@ To send albums, do <strong>not</strong> use <a href="/method/messages.sendMultiM
|
|||
<p>To purchase paid media, follow the <a href="/api/payments#22-getting-invoice-info-about-the-product">usual payment flow »</a>, passing an <a href="/constructor/inputInvoiceMessage">inputInvoiceMessage</a> with the peer and message ID of the paid media. </p>
|
||||
<p>Once the payment succeds, an <a href="/constructor/updateMessageExtendedMedia">updateMessageExtendedMedia</a> will be emitted, replacing the <a href="/constructor/messageExtendedMediaPreview">messageExtendedMediaPreview</a> constructors associated with the message with <a href="/constructor/messageExtendedMedia">messageExtendedMedia</a> constructors.<br>
|
||||
No other updates will be emitted (i.e. <strong>no</strong> <a href="/constructor/updateEditChannelMessage">updateEditChannelMessage</a> updates will be emitted for the message containing the paid media, even if re-fetching the same messages through other means like <a href="/method/messages.getHistory">messages.getHistory</a> <em>will</em> return the revealed <a href="/constructor/messageExtendedMedia">messageExtendedMedia</a> constructors).</p>
|
||||
<p>The associated <a href="/constructor/starsTransaction">starsTransaction</a> that will be generated will be of type <a href="/constructor/starsTransactionPeer">starsTransactionPeer</a> (with <code>peer</code> equal to the channel), <code>msg_id</code> equal to the message ID of the paid media and <code>extended_media</code> set to the revealed paid media. </p>
|
||||
<p><strong>Note</strong>: the <a href="/constructor/updateMessageExtendedMedia">updateMessageExtendedMedia</a> update does not have a <code>pts</code>/<code>qts</code> field.<br>
|
||||
This means that this update can only be received passively via the socket (<a href="/api/updates#event-sequences">see here »</a>), and it <strong>cannot</strong> be returned by <a href="/method/updates.getDifference">updates.getDifference</a> or <a href="/method/updates.getChannelDifference">updates.getChannelDifference</a>.<br>
|
||||
This implies that if a certain client is offline, and another session purchases a paid media, the first client will not receive the revealed <a href="/constructor/messageExtendedMedia">messageExtendedMedia</a> constructors when it reconnects to the server, and it would have no way to know that a paid media can be revealed to the user. </p>
|
||||
This implies that if a certain client is offline, and another session purchases a paid media, the first client will not receive the revealed <a href="/constructor/messageExtendedMedia">messageExtendedMedia</a> constructors when it reconnects to the server, and it would have no way to know that a cached paid media can be revealed to the user. </p>
|
||||
<p>To bypass this issue, if:</p>
|
||||
<ul>
|
||||
<li>One or more messages containing not-yet-bought paid media are visible to the user</li>
|
||||
<li>From the messages selected above, include only messages received <em>before</em> the client last went offline (i.e. exclude paid media messages that were received and cached via updates or getHistory/getMessages N seconds ago, and the client connected to the server M >= N seconds ago)</li>
|
||||
<li>From the messages selected above, include only messages for which <a href="/method/messages.getExtendedMedia">messages.getExtendedMedia</a> was called more than 15 seconds ago. </li>
|
||||
<li>For all messages satisfying the above conditions, make a single query to <a href="/method/messages.getExtendedMedia">messages.getExtendedMedia</a>, aggregating matching message IDs in <code>id</code>.<br>
|
||||
<li>
|
||||
<p>One or more messages containing not-yet-bought paid media are visible to the user.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>From the messages selected above, include only messages received <em>before</em> the client last went offline (i.e. exclude paid media messages that were received and cached via updates or getHistory/getMessages/etc N seconds ago, and the client connected to the server M >= N seconds ago).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>From the messages selected above, include only messages for which <a href="/method/messages.getExtendedMedia">messages.getExtendedMedia</a> was called more than 15 seconds ago. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For all messages satisfying the above conditions, make a single query to <a href="/method/messages.getExtendedMedia">messages.getExtendedMedia</a>, aggregating matching message IDs in <code>id</code>.<br>
|
||||
The method will return an array of <a href="/constructor/updateMessageExtendedMedia">updateMessageExtendedMedia</a> updates, only for passed messages containing <strong>already bought</strong> paid media.<br>
|
||||
No information will be returned for passed messages containing not yet bought paid media, or not containing paid media. </li>
|
||||
</ul>
|
||||
<p>The associated <a href="/constructor/starsTransaction">starsTransaction</a> that will be generated will be of type <a href="/constructor/starsTransactionPeer">starsTransactionPeer</a> (with <code>peer</code> equal to the channel), <code>msg_id</code> equal to the message ID of the paid media and <code>extended_media</code> set to the revealed paid media.</p></div>
|
||||
No information will be returned for passed messages containing not yet bought paid media, or not containing paid media. </p>
|
||||
<p>Repeat the method call every 15 seconds if at least one of the messages satisfying the above conditions is still visible.
|
||||
Repeat the method call immediately if a new paid message satisfying the above conditions scrolls into view.</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page not found</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="">
|
||||
<meta property="og:title" content="Page not found">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="">
|
||||
<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">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
|
||||
<link rel="alternate icon" href="/img/favicon.ico" type="image/x-icon" />
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
||||
<link href="/css/telegram.css?240" rel="stylesheet" media="screen">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body class="preload">
|
||||
<div class="dev_page_wrap">
|
||||
<div class="dev_page_head navbar navbar-static-top navbar-tg">
|
||||
<div class="navbar-inner">
|
||||
<div class="container clearfix">
|
||||
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="//telegram.org/">Home</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
|
||||
<li class=""><a href="/api">API</a></li>
|
||||
<li class=""><a href="/mtproto">Protocol</a></li>
|
||||
<li class="active"><a href="/schema">Schema</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container clearfix">
|
||||
<div class="dev_page">
|
||||
<div id="dev_page_content_wrap" class=" ">
|
||||
<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></li></ul></div>
|
||||
<h1 id="dev_page_title">Page not found</h1>
|
||||
|
||||
<div id="dev_page_content">The page has not been saved</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_wrap">
|
||||
<div class="footer_columns_wrap footer_desktop">
|
||||
<div class="footer_column footer_column_telegram">
|
||||
<h5>Telegram</h5>
|
||||
<div class="footer_telegram_description"></div>
|
||||
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|
||||
</div>
|
||||
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li><a href="//telegram.org/privacy">Privacy</a></li>
|
||||
<li><a href="//telegram.org/press">Press</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
|
||||
<li><a href="//telegram.org/android">Android</a></li>
|
||||
<li><a href="//telegram.org/dl/web">Mobile Web</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
|
||||
<li><a href="//macos.telegram.org/">macOS</a></li>
|
||||
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/press">Press</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?47"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Reference in a new issue