Scheduled Status #1030
Unanswered
MichaelJPDX
asked this question in
Q&A
Replies: 1 comment
-
Hi @MichaelJPDX, sorry for the inconvenience. You need to pass let client = createRestAPIClient({
url: "https://mastodon.social",
accessToken: process.env.MASTODON_TOKEN,
});
// create
let status = await client.v1.statuses.create({
status: "Hello, world!",
visibility: "public",
scheduledAt: new Date(Date.now() + 1000 * 60 * 60 * 24).toISOString(),
});
// fetch
status = await client.v1.scheduledStatuses.$select(status.id).fetch();
// list
let scheduledStatuses = await client.v1.scheduledStatuses.$select(status.id).list();
// delete
await client.v1.scheduledStatuses.$select(status.id).remove(); Due to the limited bandwidth, we're currently citing all the docs for the REST API from official website of Mastodon (https://docs.joinmastodon.org) and because of this, the naming convention doesn't match with the actual APIs provided by Masto.js in some cases. We are aware of this issue and plan to have better documentation in place in the future! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to schedule a status by passing a scheduled_at value in the parameters of masto.v1.statuses.create() but it isn't working. There's no example of how to do this and the documentation only seems to reference getting already scheduled statuses. Can we schedule statuses using Masto.js or is it not supported?
Beta Was this translation helpful? Give feedback.
All reactions