Update description

This commit is contained in:
Daniil Gentili 2018-07-11 15:54:55 +02:00
parent 18ab6557a3
commit 3bda743116
3 changed files with 4 additions and 63 deletions

View File

@ -1,13 +1,13 @@
---
title: account.acceptAuthorization
description: Accept telegram password authorization
description: Accept telegram passport authorization
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Method: account.acceptAuthorization
[Back to methods index](index.md)
Accept telegram password authorization
Accept telegram passport authorization
### Parameters:

View File

@ -28,7 +28,7 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
* [Create a secret chat bot](https://docs.madelineproto.xyz/docs/SECRET_CHATS.html)
* <a href="account_acceptAuthorization.html" name="account_acceptAuthorization">Accept telegram password authorization: account.acceptAuthorization</a>
* <a href="account_acceptAuthorization.html" name="account_acceptAuthorization">Accept telegram passport authorization: account.acceptAuthorization</a>
* <a href="help_acceptTermsOfService.html" name="help_acceptTermsOfService">Accept telegram's TOS: help.acceptTermsOfService</a>
@ -216,8 +216,6 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
* <a href="messages_getFeaturedStickers.html" name="messages_getFeaturedStickers">Get featured stickers: messages.getFeaturedStickers</a>
* <a href="upload_getFileHashes.html" name="upload_getFileHashes">Get file hashes: upload.getFileHashes</a>
* <a href="messages_getInlineGameHighScores.html" name="messages_getInlineGameHighScores">Get high scores of a game sent in an inline message: messages.getInlineGameHighScores</a>
* <a href="messages_getGameHighScores.html" name="messages_getGameHighScores">Get high scores of a game: messages.getGameHighScores</a>

View File

@ -7,65 +7,8 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
Get file hashes
### Parameters:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
|location|[InputFileLocation](../types/InputFileLocation.md) | Yes|The file|
|offset|[int](../types/int.md) | Yes|Offset|
### Return type: [Vector\_of\_FileHash](../types/FileHash.md)
### Can bots use this method: **YES**
### MadelineProto Example:
```
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Vector_of_FileHash = $MadelineProto->upload->getFileHashes(['location' => InputFileLocation, 'offset' => int, ]);
```
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - upload.getFileHashes
* params - `{"location": InputFileLocation, "offset": int, }`
### As a user:
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFileHashes`
Parameters:
location - Json encoded InputFileLocation
offset - Json encoded int
**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info**
Or, if you're into Lua:
```
Vector_of_FileHash = upload.getFileHashes({location=InputFileLocation, offset=int, })
```