PhpBotFramework  1.0.0
A framework for Telegram Bots' APIs.
Functions
InlineQueryResults

Functions

 DanySpin97\PhpBotFramework\InlineQueryResults::__construct ()
 
 DanySpin97\PhpBotFramework\InlineQueryResults::newArticle ($title, $message_text, $description='', array $reply_markup=null, $parse_mode='HTML', $disable_web_preview=false)
 Add a result of type article article. More...
 
 DanySpin97\PhpBotFramework\InlineQueryResults::newArticleKeyboard (&$title, &$message_text, &$description, array &$reply_markup, $parse_mode='HTML', $disable_web_preview=false)
 Optimized version of newArticle that take reference for the first 4 parameters. More...
 
DanySpin97\PhpBotFramework\InlineQueryResults::getResults ()
 Get all results created. More...
 

Detailed Description

Function Documentation

§ __construct()

DanySpin97\PhpBotFramework\InlineQueryResults::__construct ( )

Create an InlineQueryResult object.

§ getResults()

& DanySpin97\PhpBotFramework\InlineQueryResults::getResults ( )

Get all results created.

Returns
JSON-serialized string containing the results.

§ newArticle()

DanySpin97\PhpBotFramework\InlineQueryResults::newArticle (   $title,
  $message_text,
  $description = '',
array  $reply_markup = null,
  $parse_mode = 'HTML',
  $disable_web_preview = false 
)

Add a result of type article article.

Add a result that will be show to the user.

Parameters
$titleTitle of the result.
$message_textText of the message to be sent.
$descriptionOptional. Short description of the result
$reply_markupInline keyboard object (Not JSON serialized, use getArray from InlineKeyboard class).
$parse_modeOptional. Formattation of the message.
$disable_web_previewOptional. Disables link previews for links in the sent message
Returns
Id the the article added

§ newArticleKeyboard()

DanySpin97\PhpBotFramework\InlineQueryResults::newArticleKeyboard ( $title,
$message_text,
$description,
array &  $reply_markup,
  $parse_mode = 'HTML',
  $disable_web_preview = false 
)

Optimized version of newArticle that take reference for the first 4 parameters.

See also
newArticle