Content pfp
Content
@
0 reply
0 recast
0 reaction

Jorge Pablo Franetovic 🎩 pfp
Jorge Pablo Franetovic 🎩
@jpfraneto.eth
i have my hub running i want to extract from its current state all the casts that meet a certain condition (let's say they have the string $bleu inside its text), and save all those casts on on that same machine how would you do this? what's the equivalent of a for loop to check all this info?
4 replies
0 recast
3 reactions

Daniel pfp
Daniel
@damoos
for what I know there is no API to fetch all casts. However you can loop through all fids and use query GetCastsByFid (https://www.thehubble.xyz/docs/api.html#_3-cast-service) or the HTTP equivalent. And for live updates you can subscribe to https://www.thehubble.xyz/docs/api.html#_7-event-service. Another option would be to access the rocksdb directly (if you have local access) but I don't think that's necessary and I'd rather go for the normal API integration..
1 reply
0 recast
1 reaction

Samuel pfp
Samuel
@samuellhuber.eth
have you accessed the rocks db directly before. wondering how people do it. just using the file? what may help is the event endpoint (may not have all history you need) and you need to manually filter for your casts https://docs.farcaster.xyz/reference/hubble/httpapi/events#events
1 reply
0 recast
0 reaction

Daniel pfp
Daniel
@damoos
I haven't for farcaster, but it's just the .rocksdb folder (and the sync subfolder for the merkle patricia tree). Not that I'd recommend it though for projects like the one mentioned above.
0 reply
0 recast
0 reaction