Commit Graph

111 Commits

Author SHA1 Message Date
Mahesh Bansod 605b23aff1 Fix: check if the vector for sessions is empty and create a session if so 2021-10-20 20:49:38 +05:30
Mahesh Bansod f42d61beee Added `network.get_profile` and `Profile` + fix: evaluate result before sending request for `account.set_profile_picture` 2021-10-19 21:57:03 +05:30
Mahesh Bansod 12443b53ba Added `set_profile_picture` 2021-10-19 21:34:39 +05:30
Mahesh Bansod 01c55385b1 SessionIdentification derives Clone now 2021-10-19 21:32:14 +05:30
Mahesh Bansod bbea7cda91 Converted some crates to modules 2021-10-18 21:29:28 +05:30
Mahesh Bansod 9ae31ee544 rename all crates to add prefix socialvoid_ 2021-10-18 20:44:34 +05:30
Mahesh Bansod 28448a715f Added some validation error enum values 2021-10-16 12:12:59 +05:30
Mahesh Bansod ac7482b4ac Resolve CDN server url from ServerInformation 2021-10-16 12:08:52 +05:30
Mahesh Bansod 5c2a492a2c removed some unnecessary let bindings 2021-10-16 11:54:28 +05:30
Mahesh Bansod 328b582088 Streaming the file instead of sending all the bytes at once 2021-10-16 11:52:04 +05:30
Mahesh Bansod 59563f212f Allow changing cdn url by client 2021-10-16 11:47:18 +05:30
Mahesh Bansod d3e48e024f Clippy suggestions - redundant field name, unnecessary cast, empty instead of len zero check, unnecessary let binding 2021-10-15 20:41:55 +05:30
Mahesh Bansod 843a1a6d9c lazy evaluation by adding closures i.e. `*_or(` to `*_or_else(|_?|` wherever possible 2021-10-15 20:37:17 +05:30
Mahesh Bansod 60a4f6966d Default implementation for BatchRequestBuilder 2021-10-15 20:33:12 +05:30
Mahesh Bansod 2f50417edd Added cdn stuff + made Document public + sent SessionIdentification to types crate 2021-10-15 20:29:55 +05:30
Mahesh Bansod e156ed11c8 Updated binary name to `socialvoid-cli` & updated README 2021-10-10 19:16:07 +05:30
Mahesh Bansod fe7e5466e4 Added Register subcommand 2021-10-10 15:20:02 +05:30
Mahesh Bansod 1cab541f43 Removed `display_picture_sizes` from Peer 2021-10-10 15:19:14 +05:30
Mahesh Bansod 5cc26a4a2c Made HelpDocument completely public and added method to get the text 2021-10-10 14:55:15 +05:30
Mahesh Bansod 6e343c1d79 Refactored + delete a session if expired or not found 2021-10-10 14:41:47 +05:30
Mahesh Bansod 608f98b644 Added method to delete a session from the session list 2021-10-10 14:41:27 +05:30
Mahesh Bansod be477221fd Added get session to client 2021-10-10 14:25:25 +05:30
Mahesh Bansod fc30e42d17 Added basic CLI - login, get_me 2021-10-10 13:35:48 +05:30
Mahesh Bansod 1fa29ae68f Storing authenticated flag in session 2021-10-10 13:28:26 +05:30
Mahesh Bansod 38f9f7a239 added methods to get terms of service, accept them, register, authenticate, log out, and get_me to client. + test to check peer is correct 2021-10-03 22:03:26 +05:30
Mahesh Bansod 38f7fc5fcf fix: send session_identification key too in `network.get_me` 2021-10-03 21:38:41 +05:30
Mahesh Bansod ce0c689d85 made the peer type completely public 2021-10-03 21:38:07 +05:30
Mahesh Bansod dde53e05b7 now session'saccept tos isn't async and doesnt return a result. made `RegisterRequest` public 2021-10-03 21:21:39 +05:30
Mahesh Bansod 14ee098a3c added `network.get_me` 2021-10-03 21:20:24 +05:30
Mahesh Bansod 180d047509 made helpdocument's id public + added method to accept terms of service 2021-10-01 22:47:34 +05:30
Mahesh Bansod 99c4b3d15a TermsOfServiceNotAgreed error if terms of service was not fetched 2021-10-01 22:28:57 +05:30
Mahesh Bansod bf90db3fdc created a clienterror enum for handling client specific errors instead of using a simple string 2021-10-01 21:46:31 +05:30
Mahesh Bansod 1b328dabf6 added test for session challenge by comparing the answer from the python script 2021-10-01 21:44:09 +05:30
Mahesh Bansod 003735587e added batch request builder 2021-09-30 23:13:44 +05:30
Mahesh Bansod bb1786b359 some documentation + reqwest err from method text changed 2021-09-30 22:55:58 +05:30
Mahesh Bansod 689097111e `generate_id` put in mod utils 2021-09-30 22:52:22 +05:30
Mahesh Bansod f919e64a46 added `send_notification` for jsonrpc2 client (notification: request with no `id`) 2021-09-30 22:48:38 +05:30
Mahesh Bansod d54553786e refactored jsonrpc2 client 2021-09-30 22:41:40 +05:30
Mahesh Bansod 8d036d2db8 fix: use the rightmost digits instead of leftmost in the str(binary) in `hotp` 2021-09-30 21:56:47 +05:30
Mahesh Bansod 922dbfb8ba fix: not returning the session established object - setting it in `established` field of `SessionHolder` now. 2021-09-30 21:56:00 +05:30
Mahesh Bansod ab18bd8cc4 added network method `get_me` 2021-09-30 21:50:03 +05:30
Mahesh Bansod ff96accc3e jsonrpc2 client uses a random ID fr now + displaying the request in test 2021-09-22 20:47:33 +05:30
Mahesh Bansod c33955b515 Client now uses SessionHolder instead of SessionEstablished directly + Refactored session challenge code 2021-09-19 21:01:13 +05:30
Mahesh Bansod 01daa4d2ea Added `answer_challenge` method to answer challenges for methods requiring SessionIdentification 2021-09-19 20:42:42 +05:30
Mahesh Bansod b7c93d535e Added clienterror in errors 2021-09-19 20:34:39 +05:30
Mahesh Bansod c1a711cb52 Added session.register method and dummy sesh identification 2021-09-19 19:50:14 +05:30
Mahesh Bansod 547f453e0b derive Debug for peer and related types 2021-09-19 16:43:45 +05:30
Mahesh Bansod 8fb62b0f07 Made a separate crate for types + Added Peer, Document and related structs 2021-09-19 16:30:53 +05:30
Mahesh Bansod 1386a9f8d4 added authentication errors + fixed formatting in jsonrpc2-client 2021-09-19 16:13:39 +05:30
Mahesh Bansod ce0d93b4dd Did clippy suggestions - enum variant names for error variant, check for range with contains for error ranges 2021-09-19 16:01:12 +05:30