Fix typos in tdweb readme (#856)

This commit is contained in:
Khushraj Rathod 2020-01-27 15:21:26 +00:00 committed by Aliaksei Levin
parent 5e0df6f352
commit 0dcbe4973a

View File

@ -3,7 +3,7 @@
[TDLib](https://github.com/tdlib/td) is a library for building Telegram clients. tdweb is a convenient wrapper for TDLib in a browser which controls TDLib instance creation, [TDLib](https://github.com/tdlib/td) is a library for building Telegram clients. tdweb is a convenient wrapper for TDLib in a browser which controls TDLib instance creation,
handles interaction with TDLib and manages a filesystem for persistent TDLib data. handles interaction with TDLib and manages a filesystem for persistent TDLib data.
For interaction with TDLib you need to create an instance of the class `TdClient`, providing a handler for incoming updates and other options if needed. For interaction with TDLib, you need to create an instance of the class `TdClient`, providing a handler for incoming updates and other options if needed.
Once this is done, you can send queries to the TDLib instance using the method `TdClient.send` which returns a Promise object representing the result of the query. Once this is done, you can send queries to the TDLib instance using the method `TdClient.send` which returns a Promise object representing the result of the query.
See [Getting Started](https://core.telegram.org/tdlib/getting-started) for a description of basic TDLib concepts and a short introduction to TDLib usage. See [Getting Started](https://core.telegram.org/tdlib/getting-started) for a description of basic TDLib concepts and a short introduction to TDLib usage.
@ -14,16 +14,16 @@ TDLib [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_func
The JSON representation of TDLib API objects is straightforward: all API objects are represented as JSON objects with the same keys as the API object field names in the The JSON representation of TDLib API objects is straightforward: all API objects are represented as JSON objects with the same keys as the API object field names in the
[td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl) scheme. Note that in the automatically generated C++ documentation all fields have an additional terminating underscore [td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl) scheme. Note that in the automatically generated C++ documentation all fields have an additional terminating underscore
which shouldn't be used in the JSON interface. The object type name is stored in the special field '@type' which is optional in places where type is uniquely determined by the context. which shouldn't be used in the JSON interface. The object type name is stored in the special field '@type' which is optional in places where type is uniquely determined by the context.
Fields of Bool type are stored as Boolean, fields of int32, int53 and double types are stored as Number, fields of int64 and string types are stored as String, Fields of Bool type are stored as Boolean, fields of int32, int53, and double types are stored as Number, fields of int64 and string types are stored as String,
fields of bytes type are base64 encoded and then stored as String, fields of vector type are stored as Array. fields of bytes type are base64 encoded and then stored as String, fields of vector type are stored as Array.
You can also add the field '@extra' to any query to TDLib and the response will contain the field '@extra' with exactly the same value. You can also add the field '@extra' to any query to TDLib and the response will contain the field '@extra' with exactly the same value.
## Installation ## Installation
As usual, add npm tdweb package into you project: As usual, add npm tdweb package into your project:
``` ```
npm install tdweb npm install tdweb
``` ```
All files will be installed into `node_modules/tdweb/dist/` folder. For now it is your responsibility to make All files will be installed into `node_modules/tdweb/dist/` folder. For now, it is your responsibility to make
those files loadable from your server. For example, [telegram-react](https://github.com/evgeny-nadymov/telegram-react) those files loadable from your server. For example, [telegram-react](https://github.com/evgeny-nadymov/telegram-react)
manually copies this files into the `public` folder. If you know how to avoid this problem, please tell us. manually copies these files into the `public` folder. If you know how to avoid this problem, please tell us.