Update docs.madelineproto.xyz

This commit is contained in:
Daniil Gentili 2018-02-25 10:17:45 +00:00
parent 1ecd81ee82
commit 2b126a0755
23 changed files with 57 additions and 1 deletions

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -69,6 +69,7 @@ This library can also be used to create lua telegram bots (like bot API bots, on
* PFS in secret chats * PFS in secret chats
* [Clickable inline buttons](#inline-buttons)!
## PHP Requirements ## PHP Requirements
@ -178,6 +179,27 @@ You can find examples for nearly every MadelineProto function in
* [`userbots/MadelineProto_bot.php`](https://github.com/danog/MadelineProto/blob/master/userbots/MadelineProto_bot.php) - More fun shiz * [`userbots/MadelineProto_bot.php`](https://github.com/danog/MadelineProto/blob/master/userbots/MadelineProto_bot.php) - More fun shiz
* [`userbots/pwrtelegram_debug_bot`](https://github.com/danog/MadelineProto/blob/master/userbots/pwrtelegram_debug_bot.php) - More fun shiz * [`userbots/pwrtelegram_debug_bot`](https://github.com/danog/MadelineProto/blob/master/userbots/pwrtelegram_debug_bot.php) - More fun shiz
### Inline buttons
You can easily click inline buttons using MadelineProto, just access the correct button:
```
$button = $update['update']['message']['reply_markup']['rows'][0]['buttons'][0];
```
You can then access properties (they vary depending on the [type of button](https://docs.madelineproto.xyz/API_docs/types/KeyboardButton.html)):
```
$text = $button['text'];
```
And click them:
```
$button->click();
```
### Storing sessions ### Storing sessions
To store information about an account session, serialization must be done. To store information about an account session, serialization must be done.

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -27,6 +27,7 @@ $result = $KeyboardButton->click();
* `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually * `false` - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually
You can also access the properties of the constructor as a normal array, for example $button['name']
### Possible values (constructors): ### Possible values (constructors):
[keyboardButton](../constructors/keyboardButton.md) [keyboardButton](../constructors/keyboardButton.md)

View File

@ -1,5 +1,4 @@
<?php <?php
/** /**
* This file is automatic generated by build_docs.php file * This file is automatic generated by build_docs.php file
* and is used only for autocomplete in multiple IDE * and is used only for autocomplete in multiple IDE
@ -170,6 +169,7 @@ interface auth
*/ */
public function dropTempAuthKeys(array $params); public function dropTempAuthKeys(array $params);
} }
interface account interface account
{ {
/** /**
@ -433,6 +433,7 @@ interface account
*/ */
public function resetWebAuthorizations(); public function resetWebAuthorizations();
} }
interface users interface users
{ {
/** /**
@ -453,6 +454,7 @@ interface users
*/ */
public function getFullUser(array $params); public function getFullUser(array $params);
} }
interface contacts interface contacts
{ {
/** /**
@ -589,6 +591,7 @@ interface contacts
*/ */
public function resetSaved(); public function resetSaved();
} }
interface messages interface messages
{ {
/** /**
@ -1594,6 +1597,7 @@ interface messages
*/ */
public function uploadEncryptedFile(array $params); public function uploadEncryptedFile(array $params);
} }
interface updates interface updates
{ {
/** /**
@ -1626,6 +1630,7 @@ interface updates
*/ */
public function getChannelDifference(array $params); public function getChannelDifference(array $params);
} }
interface photos interface photos
{ {
/** /**
@ -1667,6 +1672,7 @@ interface photos
*/ */
public function getUserPhotos(array $params); public function getUserPhotos(array $params);
} }
interface upload interface upload
{ {
/** /**
@ -1745,6 +1751,7 @@ interface upload
*/ */
public function getCdnFileHashes(array $params); public function getCdnFileHashes(array $params);
} }
interface help interface help
{ {
/** /**
@ -1819,6 +1826,7 @@ interface help
*/ */
public function getRecentMeUrls(array $params); public function getRecentMeUrls(array $params);
} }
interface channels interface channels
{ {
/** /**
@ -2145,6 +2153,7 @@ interface channels
*/ */
public function togglePreHistoryHidden(array $params); public function togglePreHistoryHidden(array $params);
} }
interface bots interface bots
{ {
/** /**
@ -2167,6 +2176,7 @@ interface bots
*/ */
public function answerWebhookJSONQuery(array $params); public function answerWebhookJSONQuery(array $params);
} }
interface payments interface payments
{ {
/** /**
@ -2225,6 +2235,7 @@ interface payments
*/ */
public function clearSavedInfo(array $params); public function clearSavedInfo(array $params);
} }
interface stickers interface stickers
{ {
/** /**
@ -2269,6 +2280,7 @@ interface stickers
*/ */
public function addStickerToSet(array $params); public function addStickerToSet(array $params);
} }
interface phone interface phone
{ {
/** /**
@ -2352,6 +2364,7 @@ interface phone
*/ */
public function saveCallDebug(array $params); public function saveCallDebug(array $params);
} }
interface langpack interface langpack
{ {
/** /**