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

Jorge Pablo Franetovic 🎩 pfp
Jorge Pablo Franetovic 🎩
@jpfraneto.eth
cc @samuellhuber.eth @downshift.eth
1 reply
0 recast
0 reaction

jj 🛟 pfp
jj 🛟
@jj
May I ask what you’re trying to do after you save the casts? Because you can create a historic feed on @buoy on this now
1 reply
0 recast
1 reaction

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

Nabil Abdellaoui pfp
Nabil Abdellaoui
@randombishop
There's one way to do that but I am new to farcaster so maybe there's way easier solutions than mine: 1) Install a postgres db and shuttle to replicate all hub data to a database. 2) Add an index to casts.text column. (https://www.postgresql.org/docs/current/textsearch.html) 3) You can now find anything you need with SQL queries.
0 reply
0 recast
0 reaction