Commit Graph

27 Commits

Author SHA1 Message Date
Matthias Beyer 524c246972
Fix clippy: Remove unnecessary reference
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 15:46:58 +01:00
Matthias Beyer edad6082a1
Fix clippy: Remove manual copying in iterator
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 15:46:40 +01:00
Matthias Beyer e933f1efec
Fix clippy: Explicitely implement PartialOrd
This patch fixes `clippy::derive_ord_xor_partial_ord` by implementing
PartialOrd manually instead of deriving it.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 15:45:44 +01:00
Matthias Beyer e19070f935
Fix clippy: Remove unneeded clone() call
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 15:44:07 +01:00
Matthias Beyer d7453454b3
Fix clippy: Remove unneeded reference
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 15:43:37 +01:00
Matthias Beyer 6bdc0fea5a
Fix clippy: Remove unneeded return statement
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 15:43:08 +01:00
Christian Kruse e0ba85ea1b if magic is disabled `self.magic` is not available
and thus compilation fails with `if cfg!()` construct
2022-12-27 08:22:10 +01:00
D. Scott Boggs 77ccc715c8 Fix discrepancy in server response formats 2022-12-26 12:19:51 -05:00
D. Scott Boggs 6e5c93d997 Fix bug in media upload, add optional detectoin of mime-/file-type 2022-12-26 11:19:54 -05:00
D. Scott Boggs 5d59c5a462 Add descriptions to media upload methods 2022-12-25 07:01:41 -05:00
D. Scott Boggs c9ea7c9ea9 fix bug in route_v2 macro 2022-12-25 06:48:24 -05:00
D. Scott Boggs ed497d96d4 Improve remote error handling 2022-12-23 12:18:03 -05:00
D. Scott Boggs 2ec3bd42ec Rename elefren to mastodon-async 2022-12-23 12:18:03 -05:00
D. Scott Boggs ed05a7b337 Update to use search v2; fix search example
Search v1 has been removed
2022-12-23 12:18:03 -05:00
D. Scott Boggs 59dfc7085b this file isn't needed anymore 2022-12-22 12:28:18 -05:00
D. Scott Boggs 94b7cd4087 Rearrange macro; fix quoting issue 2022-12-22 12:28:08 -05:00
D. Scott Boggs ca7f9c86a6 Removed more references to websockets 2022-12-22 12:27:30 -05:00
D. Scott Boggs 334e620d3c Add methods for remaining streams 2022-12-18 18:00:58 -05:00
D. Scott Boggs c5141972e4 Add macro for streaming routes 2022-12-18 17:30:23 -05:00
D. Scott Boggs 610d51c593 use SSE for streaming events
The Mastodon API doesn't use WebSockets for sending events, it uses SSE.
That is to say, it sends events as lines in a continually-streamed
response.
2022-12-18 17:25:53 -05:00
D. Scott Boggs c811f42054 misc fixups 2022-12-18 16:06:30 -05:00
D. Scott Boggs 6afdc06cc7 Added authentication and more robust response logs 2022-12-18 16:03:46 -05:00
D. Scott Boggs 648de8c8e5 Add read_response helper
This fixes a bug where a chunked response would be partially read and then hang forever waiting for another chunk, and adds additional debug logging to the request process.
2022-12-07 16:21:00 -05:00
D. Scott Boggs c9fc25a0c9 add logging 2022-12-07 15:58:28 -05:00
D. Scott Boggs e69d92f71e Update client to work asynchronously
- Use reqwest's async client
 - Convert items_iter() to a futures::Stream
 - make Mastodon client an Arc smart pointer, removing the need for OwnedPage.
 - remove MastodonClient and HttpSender traits; these can be re-added once async trait fns are stabilized
 - make EventStream a futures::Stream
2022-12-05 10:35:29 -05:00
D. Scott Boggs f054c7d805 Update Rust Edition; Update dependencies
Async needs added
2022-11-29 18:50:29 -05:00
D. Scott Boggs 96b16c62d9 initial state; elefren 0.22.0 2022-11-27 09:44:43 -05:00