JBGruber / atrrr

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

searching for username #6

Closed schochastics closed 1 year ago

schochastics commented 1 year ago

Not sure if this is an actual issue or user error. I can only find my handle when I add .bsky.social

library(atr)
search_user("schochastics")
#> ℹ Parsing 0 results.
#> ✔ Got 0 results. All done!
#> 
#> # A tibble: 0 × 0
search_user("schochastics.bsky.social")
#> ℹ Parsing 1 results.
#> ✔ Got 1 results. All done!
#> 
#> # A tibble: 1 × 8
#>   did             handle display_name description avatar indexed_at viewer_muted
#>   <chr>           <chr>  <chr>        <chr>       <chr>  <chr>      <lgl>       
#> 1 did:plc:sv2aev… schoc… David Schoch "Team Lead… https… 2023-11-0… FALSE       
#> # ℹ 1 more variable: viewer_blocked_by <lgl>

Created on 2023-11-10 with reprex v2.0.2

JBGruber commented 1 year ago

Ah, sorry, we need to fix the documentation on this. search_user searches for exact matches of the user handle and partial matches in the bio and user name. Because of coincidence, the examples look like they would match my and @favstats partial handles:

library(atr)
search_user("jbgruber")
#> ℹ Parsing 2 results.
#> ✔ Got 2 results. All done!
#> 
#> # A tibble: 2 × 9
#>   did             handle display_name description avatar indexed_at viewer_muted
#>   <chr>           <chr>  <chr>        <chr>       <chr>  <chr>      <lgl>       
#> 1 did:plc:lfeig2… schwa… Schwabensch… "Die Nachr… https… 2023-10-2… FALSE       
#> 2 did:plc:ntd53a… jbgru… Johannes B.… "Postdoc @… https… 2023-10-2… FALSE       
#> # ℹ 2 more variables: viewer_blocked_by <lgl>, viewer_following <chr>

But this only works because I have my Github username in my bio, which is the same as my Bluesky handle. I can find you with:

search_user("Team Lead at GESIS")
#> ℹ Parsing 2 results.
#> ✔ Got 2 results. All done!
#> 
#> # A tibble: 2 × 10
#>   did             handle display_name description avatar indexed_at viewer_muted
#>   <chr>           <chr>  <chr>        <chr>       <chr>  <chr>      <lgl>       
#> 1 did:plc:sv2aev… schoc… David Schoch "Team Lead… https… 2023-11-0… FALSE       
#> 2 did:plc:df244l… kwell… Katrin Well… "computati… https… 2023-10-1… FALSE       
#> # ℹ 3 more variables: viewer_blocked_by <lgl>, viewer_following <chr>,
#> #   viewer_followed_by <chr>

Or:

search_user("David Schoch")
#> ℹ Parsing 1 results.
#> ✔ Got 1 results. All done!
#> 
#> # A tibble: 1 × 10
#>   did             handle display_name description avatar indexed_at viewer_muted
#>   <chr>           <chr>  <chr>        <chr>       <chr>  <chr>      <lgl>       
#> 1 did:plc:sv2aev… schoc… David Schoch "Team Lead… https… 2023-11-0… FALSE       
#> # ℹ 3 more variables: viewer_blocked_by <lgl>, viewer_following <chr>,
#> #   viewer_followed_by <chr>

Created on 2023-11-10 with reprex v2.0.2

Created on 2023-11-10 with reprex v2.0.2

schochastics commented 1 year ago

perfect, thanks for the explanation!