diff --git a/index.html b/index.html index ef13d9d..542203e 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@
TLSharp.Core.dll to your awesome project.Telegram separate files to two categories -> big file and small file. File is Big if its size more than 10 Mb. TLSharp tries to hide this complexity from you, thats why we provide one method to upload files UploadFile.
+ + var fileResult = await client.UploadFile("cat.jpg", new StreamReader("data/cat.jpg"));TLSharp provides two wrappers for sending photo and document
+ + await client.SendUploadedPhoto(new TLInputPeerUser() { user_id = user.id }, fileResult, "kitty");
+ await client.SendUploadedDocument(
+ new TLInputPeerUser() { user_id = user.id },
+ fileResult,
+ "some zips", //caption
+ "application/zip", //mime-type
+ new TLVector<TLAbsDocumentAttribute>()); //document attributes, such as file nameFull code you can see at SendPhotoToContactTest and SendBigFileToContactTest
+ +To download file you should call GetFile method
+ + await client.GetFile(
+ new TLInputDocumentFileLocation()
+ {
+ access_hash = document.access_hash,
+ id = document.id,
+ version = document.version
+ },
+ document.size); //size of fileChunk you want to retrieveFull code you can see at DownloadFileFromContactTest
+ +For your convenience TLSharp have wrappers for several Telegram API methods. You could add your own, see details below.
@@ -159,6 +192,10 @@ All dependencies listed in The only way is Telegram API docs. Yes, it's outdated. But there is no other source. Latest scheme in JSON format you can find here -Contributing is highly appreciated!
-