A Ruby gem for streaming data from the Bluesky/ATProto firehose

small tweaks in the readme

+6 -4
+6 -4
README.md
··· 44 # this gives you a parsed message object, one of subclasses of Skyfall::Firehose::Message 45 sky.on_message { |msg| p msg } 46 47 - # this gives you raw data as received from the websocket 48 sky.on_raw_message { |data| p data } 49 50 # lifecycle events ··· 159 Account messages additionally have: 160 161 - `active?` - whether the account is active, or inactive for any reason 162 - - `status` - if not active, shows the status of the account (`"deactivated"`, `"deleted"`, `"takendown"`) 163 164 Info messages additionally have: 165 ··· 278 279 ### Jetstream filters 280 281 - Jetstream allows you to specify [filters](https://github.com/bluesky-social/jetstream?tab=readme-ov-file#consuming-jetstream) of collection types and/or tracked DIDs when you connect, so it will send you only the events you're interested in. You can e.g. only ask for posts and ignore likes, or only profile events and ignore everything else, or only listen for posts from a few specific accounts. 282 283 To use these filters, pass the "wantedCollections" and/or "wantedDids" parameters in the options hash when initializing `Skyfall::Jetstream`. You can use the original JavaScript param names, or a more Ruby-like snake_case form: 284 ··· 292 For collections, you can also use the symbol codes used in `Operation#type`, e.g. `:bsky_post`: 293 294 ```rb 295 - sky = Skyfall::Jetstream.new('jetstream1.us-east.bsky.network', { wanted_collections: [:bsky_post] }) 296 ``` 297 298 See [Jetstream docs](https://github.com/bluesky-social/jetstream?tab=readme-ov-file#consuming-jetstream) for more info on available filters.
··· 44 # this gives you a parsed message object, one of subclasses of Skyfall::Firehose::Message 45 sky.on_message { |msg| p msg } 46 47 + # this gives you raw binary data as received from the websocket 48 sky.on_raw_message { |data| p data } 49 50 # lifecycle events ··· 159 Account messages additionally have: 160 161 - `active?` - whether the account is active, or inactive for any reason 162 + - `status` - if not active, shows the status of the account (`:deactivated`, `:deleted`, `:takendown`) 163 164 Info messages additionally have: 165 ··· 278 279 ### Jetstream filters 280 281 + Jetstream allows you to specify [filters](https://github.com/bluesky-social/jetstream?tab=readme-ov-file#consuming-jetstream) of collection types and/or tracked DIDs when you connect, so it will send you only the events you're interested in. You can e.g. ask only for posts and ignore likes, or only profile events and ignore everything else, or only listen for posts from a few specific accounts. 282 283 To use these filters, pass the "wantedCollections" and/or "wantedDids" parameters in the options hash when initializing `Skyfall::Jetstream`. You can use the original JavaScript param names, or a more Ruby-like snake_case form: 284 ··· 292 For collections, you can also use the symbol codes used in `Operation#type`, e.g. `:bsky_post`: 293 294 ```rb 295 + sky = Skyfall::Jetstream.new('jetstream1.us-east.bsky.network', { 296 + wanted_collections: [:bsky_post] 297 + }) 298 ``` 299 300 See [Jetstream docs](https://github.com/bluesky-social/jetstream?tab=readme-ov-file#consuming-jetstream) for more info on available filters.