JBGruber / atrrr

AT Protocol (Authenticated Transfer Protocol behind Bluesky) R package
https://jbgruber.github.io/atrrr
Other
13 stars 2 forks source link

Get my own likes? #20

Closed smach closed 3 hours ago

smach commented 4 hours ago

Hi, thanks so much for the package! Sorry if I missed it, but I was wondering if you've implemented the getActorLikes API option that would let me see all of my own likes? (No big deal if you didn't, the bskyr pkg has that, I can use both)

JBGruber commented 3 hours ago

I've implemented it now :grin:

library(atrrr)
get_actor_likes("jbgruber.bsky.social")
#> ⠙ Got 25 like entries, but there is more.. [758ms]
#> ℹ Parsing 25 results.
#> ✔ Got 25 results. All done!
#> 
#> # A tibble: 25 × 20
#>    uri           cid   author_handle author_name text  author_data  post_data   
#>    <chr>         <chr> <chr>         <chr>       <chr> <list>       <list>      
#>  1 at://did:plc… bafy… justchidi.bs… Chidi       "Tha… <named list> <named list>
#>  2 at://did:plc… bafy… stoltzmaniac… Scott Stol… "Fin… <named list> <named list>
#>  3 at://did:plc… bafy… cbarrie.bsky… Christophe… "I w… <named list> <named list>
#>  4 at://did:plc… bafy… craighamilto… Craig Hami… "Tha… <named list> <named list>
#>  5 at://did:plc… bafy… craighamilto… Craig Hami… "Joh… <named list> <named list>
#>  6 at://did:plc… bafy… cbarrie.bsky… Christophe… "Gre… <named list> <named list>
#>  7 at://did:plc… bafy… n8carp.bsky.… Nathan Car… "Can… <named list> <named list>
#>  8 at://did:plc… bafy… rpodcast.bsk… R-Podcast … "Loo… <named list> <named list>
#>  9 at://did:plc… bafy… pwgtennant.b… Peter Tenn… "Bad… <named list> <named list>
#> 10 at://did:plc… bafy… justchidi.bs… Chidi       "Put… <named list> <named list>
#> # ℹ 15 more rows
#> # ℹ 13 more variables: embed_data <list>, reply_count <int>,
#> #   repost_count <int>, like_count <int>, indexed_at <dttm>, in_reply_to <chr>,
#> #   in_reply_root <chr>, quotes <chr>, tags <list>, mentions <list>,
#> #   links <list>, langs <list>, labels <list>

Created on 2024-11-17 with reprex v2.1.1

Thanks for making me aware of it. FYI: it is very easy to implement an endpoints, as the underlying functions exist already (in this case app_bsky_feed_get_actor_likes), but we only implemented what we found most interesting and had time for. More suggestions or PRs are welcome!