Now byte strings are actually objects, everything is even faster, and more thread safe. Modifying the settings is even easier now.

This commit is contained in:
Daniil Gentili 2017-05-18 11:12:33 +01:00
parent 3c4412cf1e
commit b67ce553fc
2356 changed files with 9450 additions and 324 deletions

View File

@ -136,14 +136,7 @@ Becomes:
$settings = [
'authorization' => [ // Authorization settings
'default_temp_auth_key_expires_in' => 86400,
'rsa_key' => '-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAwVACPi9w23mF3tBkdZz+zwrzKOaaQdr01vAbU4E1pvkfj4sqDsm6
lyDONS789sVoD/xCS9Y0hkkC3gtL1tSfTlgCMOOul9lcixlEKzwKENj1Yz/s7daS
an9tqw3bfUV/nqgbhGX81v/+7RFAEd+RwFnK7a+XYl9sluzHRyVVaTTveB2GazTw
Efzk2DWgkBluml8OREmvfraX3bkHZJTKX4EQSjBbbdJ2ZXIsRrYOXfaA+xayEGB+
8hdlLmAjbCVfaigxX0CDqWeR1yFL9kwd9P0NsZRPsmoqVwMbMu7mStFai6aIhc3n
Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
-----END RSA PUBLIC KEY-----',
'rsa_keys' => array with default rsa keys
]
// The remaining subsetting arrays are the set to default
]
@ -151,20 +144,11 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
Note that only settings arrays or values of a settings array will be set to default.
The settings array can be accessed in the instantiated class like this:
The settings array can be accessed and modified in the instantiated class by accessing the `settings` attribute of the API class:
```
$MadelineProto = new \danog\MadelineProto\API();
var_dump($MadelineProto->get_settings());
```
The settings array can be modified in the instantiated class like this:
```
$MadelineProto = new \danog\MadelineProto\API();
$settings = $MadelineProto->get_settings();
// Make changes to $settings
$MadelineProto->update_settings($settings);
var_dump($MadelineProto->settings);
```
### Handling updates

View File

@ -7,6 +7,10 @@ description: auth_codeTypeCall attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: auth_codeTypeFlashCall attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: auth_codeTypeSms attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelMessagesFilterEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelParticipantsAdmins attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelParticipantsBots attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelParticipantsKicked attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelParticipantsRecent attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelRoleEditor attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelRoleEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: channelRoleModerator attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: chatInviteEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: chatPhotoEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: contactLinkContact attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: contactLinkHasPhone attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: contactLinkNone attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: contactLinkUnknown attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: contacts_contactsNotModified attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: contacts_topPeersNotModified attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: decryptedMessageActionFlushHistory attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: decryptedMessageActionNoop attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: decryptedMessageMediaEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: destroy_auth_key_fail attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: destroy_auth_key_none attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: destroy_auth_key_ok attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: documentAttributeAnimated attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: documentAttributeAnimated attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: documentAttributeHasStickers attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: documentAttributeSticker attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: draftMessageEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: encryptedFileEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: geoPointEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: help_noAppUpdate attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputChannelEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputChatPhotoEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputDocumentEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputEncryptedFileEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputGeoPointEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMediaEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterChatPhotos attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterDocument attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterGif attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterMusic attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterPhotoVideo attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterPhotoVideoDocuments attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterPhotos attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterRoundVideo attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterRoundVoice attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterUrl attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterVideo attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputMessagesFilterVoice attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputNotifyAll attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputNotifyChats attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputNotifyUsers attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPeerEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPeerNotifyEventsAll attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPeerNotifyEventsEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPeerSelf attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPhotoEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPrivacyKeyChatInvite attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPrivacyKeyPhoneCall attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPrivacyKeyStatusTimestamp attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPrivacyValueAllowAll attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPrivacyValueAllowContacts attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPrivacyValueDisallowAll attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputPrivacyValueDisallowContacts attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputReportReasonPornography attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputReportReasonSpam attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputReportReasonViolence attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputStickerSetEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputUserEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: inputUserSelf attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messageActionChatDeletePhoto attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messageActionEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messageActionHistoryClear attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messageActionPinMessage attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messageMediaEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messageMediaUnsupported attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messages_allStickersNotModified attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messages_featuredStickersNotModified attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messages_recentStickersNotModified attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messages_savedGifsNotModified attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messages_stickerSetInstallResultSuccess attributes, type and exampl
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: messages_stickersNotModified attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: notifyAll attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: notifyChats attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: notifyUsers attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: pageBlockDivider attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: pageBlockUnsupported attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: peerNotifyEventsAll attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: peerNotifyEventsEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: peerNotifySettingsEmpty attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: phoneCallDiscardReasonBusy attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: phoneCallDiscardReasonDisconnect attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: phoneCallDiscardReasonHangup attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: phoneCallDiscardReasonMissed attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: privacyKeyPhoneCall attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

View File

@ -7,6 +7,10 @@ description: privacyKeyStatusTimestamp attributes, type and example
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|

Some files were not shown because too many files have changed in this diff Show More