- added getFile method

This commit is contained in:
Ilya P 2016-10-23 13:29:18 +03:00
parent 1d6035aeb7
commit f6ad50ce94
2 changed files with 82 additions and 32 deletions

View file

@ -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;