Update JSON C++ example.
This commit is contained in:
parent
3efc530fc4
commit
012353aef5
@ -21,4 +21,4 @@ cmake --build .
|
|||||||
|
|
||||||
Documentation for all available classes and methods can be found at https://core.telegram.org/tdlib/docs.
|
Documentation for all available classes and methods can be found at https://core.telegram.org/tdlib/docs.
|
||||||
|
|
||||||
To run `tdjson_example` you may need to manually copy a `tdjson` shared library from `td/bin` to a directory containing built binaries.
|
To run the examples you may need to manually copy needed shared libraries from `td/bin` to a directory containing built binaries.
|
||||||
|
@ -18,6 +18,9 @@ int main() {
|
|||||||
int client_id = td_create_client();
|
int client_id = td_create_client();
|
||||||
// somehow share the client_id with other threads, which will be able to send requests via td_send
|
// somehow share the client_id with other threads, which will be able to send requests via td_send
|
||||||
|
|
||||||
|
// start the client by sending request to it
|
||||||
|
td_send(client_id, "{\"@type\":\"getOption\", \"name\":\"version\"}");
|
||||||
|
|
||||||
const bool test_incorrect_queries = false;
|
const bool test_incorrect_queries = false;
|
||||||
if (test_incorrect_queries) {
|
if (test_incorrect_queries) {
|
||||||
td_execute("{\"@type\":\"setLogVerbosityLevel\", \"new_verbosity_level\":1}");
|
td_execute("{\"@type\":\"setLogVerbosityLevel\", \"new_verbosity_level\":1}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user