Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post does not support langs property #16

Closed
olihawkins opened this issue Aug 30, 2024 · 2 comments
Closed

post does not support langs property #16

olihawkins opened this issue Aug 30, 2024 · 2 comments
Milestone

Comments

@olihawkins
Copy link

A Bluesky record may contain a property called langs which specifies the languages of the text content.

https://atproto.blue/en/latest/atproto/atproto_client.models.app.bsky.feed.post.html

AFAICT the post function does not currently support this property. It would be great if this could be set with an argument to the function.

@JBGruber
Copy link
Owner

JBGruber commented Sep 3, 2024

I agree! I think it would be enough to add an extra parameter and hand it over to the record here:

atrrr/R/feed.r

Lines 601 to 605 in cbc323c

record <- list(
"$type" = "app.bsky.feed.post",
"text" = text,
"createdAt" = format(as.POSIXct(created_at, tz = "UTC"), "%Y-%m-%dT%H:%M:%OS6Z")
)

But I don't have time in the next couple of weeks. Happy to review a PR though.

@JBGruber JBGruber added this to the 0.0.4 milestone Sep 20, 2024
@JBGruber
Copy link
Owner

JBGruber commented Oct 1, 2024

Done! I also implemented two other fields from the document you linked:

library(atrrr)
post_id <- post_skeet(
  text = "Testing if language, additional hashtags and labels work correctly from {atrrr} in #rstats.",
  image = "screenshot.png",
  labels = c("unsupported-label", "sexual")
  langs = "en-US",
  tags = c("testing", "programming")
)

https://bsky.app/profile/jbgruber.bsky.social/post/3l5h5cu4elg2d

@JBGruber JBGruber closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants