h3poteto / megalodon-rs

Fediverse API client library for Rust
Apache License 2.0
106 stars 24 forks source link

Infer streaming URL from instance information #204

Closed ASTRELION closed 4 months ago

ASTRELION commented 4 months ago

This PR attempts to infer the base streaming URL from the instance information instead of needing to manually provide it separately. It does this by calling get_instance() and retrieving the streaming_api URL if available, otherwise it will use the base_url of the client.

This is obviously a breaking change, since the function signatures for all the streaming functions have all become async and the streaming_url parameter is removed.

h3poteto commented 4 months ago

It is a little breaking change, so I will merge it in the next minor release (not a patch release).