2.0.1 • Published 10 months ago

@atcute/bluesky-threading v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@atcute/bluesky-threading

create Bluesky threads containing multiple posts with one write.

import { XRPC } from '@atcute/client';
import { AtpAuth } from '@atcute/client/middlewares/auth';

import RichTextBuilder from '@atcute/bluesky-richtext-builder';
import { publishThread } from '@atcute/bluesky-threading';

const rpc = new XRPC({ service: 'https://bsky.social' });
const auth = new AtpAuth(rpc);

await auth.login({ identifier: '...', password: '...' });

await publishThread(rpc, {
	author: 'did:plc:ia76kvnndjutgedggx2ibrem',
	languages: ['en'],
	posts: [
		{
			content: new RichTextBuilder()
				.addText('Hello, please visit my website! ')
				.addLink('example.com', 'https://example.com'),
		},
		{
			content: {
				text: `Here's the second post!`,
			},
		},
		{
			content: {
				text: `Third post for good measure.`,
			},
		},
	],
});
2.0.1

10 months ago

2.0.0

12 months ago

1.0.0

12 months ago