You are viewing a single comment's thread from:

RE: Programming Diary #30: Towards tag-following

in Steem Dev2 months ago

I didn't find an easy way to identify all recent posts and replies for a given tag

Have you seen the request getCommentsByTagCreated for comments with certain tags? But I think only the tags explicitly set in the comment are taken into account there too.
Did I understand you (and @danmaruschak) correctly that you want the comments on the posts with a specific tag returned?

Sort:  
 2 months ago 

Have you seen the request getCommentsByTagCreated for comments with certain tags? But I think only the tags explicitly set in the comment are taken into account there too.

Thanks! I didn't look at it carefully yet, but I think I experimented with that a few days ago. Maybe the challenge was that it only looks at the first tag(?). Not sure, I will look at it more carefully.

Did I understand you (and @danmaruschak) correctly that you want the comments on the posts with a specific tag returned?

Exactly, if I'm following the "science" tag, and someone uses that tag in a top-level post then I want to get notified of the post and all replies below the post - regardless of whether or not the reply also used the "science" tag. Ideally, I'd repeat that process with tags in lower level posts, but I think that might require too much computation.

 last month 

Maybe the challenge was that it only looks at the first tag(?)

I think so. Another one could be getCommentsByTagsText. You could use "" for the search parameter.

Example: https://sds0.steemworld.org/content_search_api/getCommentsByTagsText/steem,book/%22%22
When checkin the returned data, I noticed that some comments have included the tags of the parent post in the metadata (the app ‘upvu’ is mostly entered in the metadata). This is why these are also returned in the tag search. This would actually also be a good suggestion for the Condenser.

someone uses that tag in a top-level post then I want to get notified of the post and all replies below the post

You probably won't be able to get them reliably directly. But if you check all comments live, it is possible. In SDS, the comments also contain the root permlink (I don't know whether this is also the case with the Steem API). This would then require an additional query for each comment.

 last month 

You probably won't be able to get them reliably directly. But if you check all comments live, it is possible. In SDS, the comments also contain the root permlink (I don't know whether this is also the case with the Steem API).

The Steem API has the root author and permlink, too. That's how I was thinking to get it. It would be nice if I could find a way to avoid that second query, but (without secondary storage), I don't think there's a reliable way. As you noted.