mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-05 14:37:04 +00:00
- added getFile method
This commit is contained in:
parent
1d6035aeb7
commit
f6ad50ce94
2 changed files with 82 additions and 32 deletions
|
|
@ -8,6 +8,7 @@ using TeleSharp.TL.Auth;
|
|||
using TeleSharp.TL.Contacts;
|
||||
using TeleSharp.TL.Help;
|
||||
using TeleSharp.TL.Messages;
|
||||
using TeleSharp.TL.Upload;
|
||||
using TLSharp.Core.Auth;
|
||||
using TLSharp.Core.MTProto.Crypto;
|
||||
using TLSharp.Core.Network;
|
||||
|
|
@ -233,6 +234,15 @@ namespace TLSharp.Core
|
|||
});
|
||||
}
|
||||
|
||||
public async Task<TLFile> GetFile(TLAbsInputFileLocation location, int filePartSize)
|
||||
{
|
||||
return await SendRequestAsync<TLFile>(new TLRequestGetFile()
|
||||
{
|
||||
location = location,
|
||||
limit = filePartSize
|
||||
});
|
||||
}
|
||||
|
||||
private void OnUserAuthenticated(TLUser TLUser)
|
||||
{
|
||||
_session.TLUser = TLUser;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue