Skip to content
Discussion options

You must be logged in to vote

Hello! My pleasure!

import .....

client = .....
post = client.get_posts(['at://did:plc:kvwvcn5iqfooopmyzvb4qzba/app.bsky.feed.post/3k2yihcrp6f2c']).posts[0]
print('likes:', post.like_count)

so the diff between get_post and get_posts is that the first one uses atproto method, which will return raw PDS record; and the second one uses bsky api which is populated by some aggregated data like total likes count. also, the nice to know, is that you can fetch many posts in only 1 request and get count of likes for all of them

this is aggregated post (AKA post view) which you will get via get_posts: https://atproto.blue/en/latest/atproto/atproto_client.models.app.bsky.feed.defs.html#atproto_clien…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ry-Mage
Comment options

Answer selected by Ry-Mage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants