MarshalX / atproto

The AT Protocol (🦋 Bluesky) SDK for Python 🐍
https://atproto.blue
MIT License
267 stars 29 forks source link

Add support for event stream #306

Closed lokxii closed 4 months ago

lokxii commented 4 months ago

The specs says that one can upgrade and HTTP connection to a websocket connection to receive event streams. However I can't find any examples / reference usage of such feature. Are there any plans for this SDK to support upgrading HTTP connection to websocket?

MarshalX commented 4 months ago

?? https://atproto.blue/en/latest/atproto_firehose/index.html

lokxii commented 4 months ago

This only subscribes to the global firehose. I am interpreting from that article that we can subscribe to events from a repo or from a list.

MarshalX commented 4 months ago

You can filter events by repo. And this will be stream by specific repo :)

lokxii commented 4 months ago

How about custom feeds?

MarshalX commented 4 months ago

@lokxii wdym? how to implement? check this https://github.com/MarshalX/bluesky-feed-generator

lokxii commented 4 months ago

I mean I thought I can websocket connect to a feed created by someone to listen to events. So I am imagining I can somehow connect to wss://(that endpoint to get feed posts)

MarshalX commented 4 months ago

@lokxii ah no. this is not how custom feed works :( the only way is to pull posts from custom feed using rest client https://docs.bsky.app/docs/tutorials/custom-feeds#viewing-a-feed-generators-posts

lokxii commented 4 months ago

Ohhh thx for your reply! I guess I will just spam get requests to keep getting posts.