Commit Graph

67 Commits

Author SHA1 Message Date
levlam
2a8156a1bc Add registerUser.disable_notification. 2024-01-29 16:43:42 +03:00
levlam
562374088c Remove setTdlibParameters.enable_storage_optimizer/ignore_file_names parameters in favor of "use_storage_optimizer" and "ignore_file_names" options. 2024-01-11 13:54:23 +03:00
levlam
d963044eb9 Update copyright year. 2024-01-01 03:07:21 +03:00
levlam
450a00a8a8 Remove mentions of unused NullPointerException. 2023-10-30 21:45:26 +03:00
levlam
f1efac5caf Update Java example to use type-safe Client.Execute. 2023-10-30 21:38:00 +03:00
levlam
4eaa1674d6 Fix Exception class name and base class. 2023-10-30 21:36:29 +03:00
levlam
3841420014 Fix Client.execute Java documentation. 2023-10-30 21:32:34 +03:00
levlam
d16fc8294c Add td_api::linkPreviewOptions. 2023-10-16 20:12:33 +03:00
Vyacheslav
dd77e4628f Strong typed API for synchronous TDLib method execution in Java interface
`Client.execute` in Java interface is now strongly typed: returned TDLib object type depends on the return type defined in the corresponding Function class.

When TDLib error is occurred, method now throws `Client.ExecutionError`.

This change adds compile-time protection against return type change and allows using this pattern:

```
try {
  TdApi.SpecificReturnType result = Client.execute(function);
  // work with strongly typed resultl without casting and type checks
} catch (Client.ExecutionError error) {
  // Handle error
}
```
2023-10-26 13:15:37 +03:00
levlam
db5d5da09b Update Java example to the latest TDLib version. 2023-08-16 00:44:12 +03:00
levlam
c62c84665a Update sendMessage usages in tests and examples. 2023-06-12 15:30:07 +03:00
levlam
419a28125b Remove finalizer from Java Client. 2023-04-26 16:15:44 +03:00
levlam
cf1984844b Update copyright year. 2023-01-01 00:28:08 +03:00
levlam
4d5625a06f Explicitly load tdjni in Client.java and TdApi.java. 2022-09-08 14:27:07 +03:00
levlam
612afe63fe Update Java example. 2022-09-08 13:47:16 +03:00
levlam
f6a2ecdded Inline tdlibParameters in setTdlibParameters. 2022-09-07 22:19:08 +03:00
levlam
287cceb162 Remove separate authorizationStateWaitEncryptionKey. 2022-09-07 21:27:23 +03:00
levlam
376476481c Restore Java example compatibility with Java 1.8. 2022-07-21 20:44:22 +03:00
levlam
327babb851 Fix Java example for old Java versions. 2022-07-15 13:58:04 +03:00
levlam
1dec0e203c Add Java example of fatal error handler. 2022-07-08 18:44:09 +03:00
levlam
9a58bc03ab Fix Java example formatting. 2022-07-08 16:12:31 +03:00
levlam
d94a750685 Remove deprecated for more than 3 years Log.java from example. 2022-07-08 15:08:50 +03:00
levlam
89aaf648fc Add Client.setLogMessageHandler to Java example. 2022-07-08 15:01:38 +03:00
levlam
8085779cdc Update copyright year. 2022-01-01 03:35:39 +03:00
levlam
26d2ee649d Add some missing new lines at the end of files. 2021-12-27 14:03:50 +03:00
levlam
059fe9911e Documentation improvements. 2021-12-17 16:28:14 +03:00
levlam
41c391f140 Update layer to 133. 2021-09-03 12:27:59 +03:00
levlam
b002c2d4a8 Use loadChats instead of getChats in examples. 2021-08-10 18:09:51 +03:00
levlam
f37f9a78c1 Fix chat list printing in Java example. 2021-01-18 14:07:06 +03:00
levlam
52c1da0a70 Update copyright year. 2021-01-01 15:57:46 +03:00
levlam
66af1a439a Use getOptions as first request. 2020-11-14 23:00:05 +03:00
levlam
5ce7448f7a Send a dummy request to initialize client. 2020-11-12 16:53:51 +03:00
levlam
358c0f2249 Add clientCount in Java example.
GitOrigin-RevId: 7b7dfcf77de1ab1db55dd42642b59f5b039943cb
2020-10-13 15:39:17 +03:00
levlam
919848f0fe Use ClientManager for Java example interface implementation.
GitOrigin-RevId: 4280b6407a1c1a18bf2a6e952f6761847b69cb83
2020-10-11 21:28:33 +03:00
levlam
29cd47f01a Fix Client close waiting in Java example.
GitOrigin-RevId: e5fa246b26b6477da4b3e3ec7444aa5e3e6c7bb2
2020-10-11 11:13:30 +03:00
levlam
b204ad4ee1 Store default exception handlers as static map in Java example.
GitOrigin-RevId: 5745859a70250d104a21edad473b655967060609
2020-10-05 21:31:27 +03:00
levlam
da55a34afc Remove ability to change update handler after client creation.
GitOrigin-RevId: 917737a440afaeb99f8a8ca809cda2d267bb4b02
2020-10-05 20:18:59 +03:00
levlam
5f605d2dd2 Fix spelling of "update handler".
GitOrigin-RevId: 2137852d967606e909e82396b4103817b1b39386
2020-10-05 20:13:15 +03:00
levlam
c72d18bcd3 Java example: store update handlers separately.
GitOrigin-RevId: dc035dc72756db604731ae7549b172ba54b5d78e
2020-10-05 18:58:38 +03:00
levlam
c9c19f3399 Add TdApi.UpdateChatIsBlocked handling in Java example.
GitOrigin-RevId: 95ddae8fe77e29bac6cd3846f78c42a4290b7b8f
2020-10-05 16:41:52 +03:00
levlam
62d7423bc3 Fix TdApi.LogStreamFile usage in examples.
GitOrigin-RevId: 25af774fee360bd1071ef911d78e50a25b78372a
2020-10-03 22:05:55 +03:00
LionZXY
e104766de3
Fix java example build (#1225) 2020-10-03 22:01:29 +03:00
levlam
25676d7ff0 Allow to specify message_thread_id in sendMessage/sendMessageAlbum/sendInlineQueryResult.
GitOrigin-RevId: b9d3545b42355c04afe305f05c0366b0bf3095b0
2020-09-23 01:52:16 +03:00
levlam
0877d7f716 Automatically detect operating system version.
GitOrigin-RevId: d693799fdbfe4919da5a70c141709f2db93063d7
2020-06-19 03:45:24 +03:00
levlam
b3b6a37048 Update Java example.
GitOrigin-RevId: f1ecb1f86457054913eefdae378998f1b6930751
2020-06-02 16:57:49 +03:00
levlam
3aaa58a8c0 Documentation improvements.
GitOrigin-RevId: 97c207980ea1265ebc5c4421a7bd22d77553f2f5
2020-01-06 21:44:09 +03:00
levlam
80c35676a2 Update copyright year.
GitOrigin-RevId: 09afb551b6e637dc69739fa735b0051a38b9e14c
2020-01-01 04:23:48 +03:00
levlam
b91c4ecf88 Add td_api::authorizationStateWaitOtherDeviceConfirmation to examples.
GitOrigin-RevId: 442ceda8e3b538d0e78a34858dc90e742ef4a126
2019-12-18 19:23:14 +03:00
levlam
b43dd2be8e Update calls to sendMessage in examples.
GitOrigin-RevId: 1a8eb0bf50eb4ce3da03c50a0a694e4ba1bbaedc
2019-12-06 02:36:33 +03:00
levlam
c1afa189f3 Support multiple chat lists.
GitOrigin-RevId: 8adecce0ddf36bb2408eecc19b7f1fc8856151fc
2019-08-22 18:24:02 +03:00