You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight, fast, universal and typed Bluesky API wrapper for Apps & Bots.
9
+
</p>
10
+
11
+
## ⚠️ tsky is still in development and is not ready for production use
12
+
13
+
tsky is still in active development and is not ready for production use. If you want to contribute to the project, please read the [CONTRIBUTING.md](../../CONTRIBUTING.md) file or join our [Discord Server](https://discord.gg/KPD7XPUZn3).
14
+
15
+
tsky is a lightweight, fast, universal and typed Bluesky API wrapper for Apps & Bots. It's designed to be easy to use, lightweight and straightforward to use. It's built with TypeScript and has full type support.
16
+
17
+
It was primarily built for the [Nimbus Client](https://github.com/nimbus-town/nimbus) but can be used in any other project that requires Bluesky API integration.
18
+
19
+
## Installation
20
+
21
+
```bash
22
+
# NPM
23
+
npm install tsky
24
+
25
+
# Yarn
26
+
yarn add tsky
27
+
28
+
# PNPM
29
+
pnpm add tsky
30
+
31
+
# Bun
32
+
bun add tsky
33
+
```
34
+
35
+
## Usage
36
+
37
+
Using a Public Agent
38
+
39
+
```ts
40
+
import { createAgent } from'@tsky/client';
41
+
42
+
const agent =awaitcreateAgent({
43
+
options: {
44
+
service: 'https://public.api.bsky.app',
45
+
},
46
+
});
47
+
48
+
// Getting a user from their handle
49
+
// First, we need to get the user's DID
50
+
const did =awaitagent.resolveDIDFromHandle(handle);
51
+
// Then, we can get the user's profile
52
+
const profile =awaitagent.actor(did);
53
+
```
54
+
55
+
Using an Authenticated Agent
56
+
57
+
```ts
58
+
import { createAgent } from'@tsky/client';
59
+
60
+
const agent =awaitcreateAgent({
61
+
credentials: {
62
+
identifier: "handle",
63
+
password: "password"
64
+
}
65
+
});
66
+
67
+
// Getting the profile of the authenticated user
68
+
const user_profile =awaitagent.user.profile();
69
+
```
70
+
71
+
## Links
72
+
73
+
-[📚 tsky Documentation](https://tsky.dev/)
74
+
-[🦋 tsky on Bluesky](https://bsky.app/profile/tsky.dev)
/** Find posts matching search criteria, returning views of those posts. */
1374
+
/** Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations. */
1328
1375
exportdeclarenamespaceAppBskyFeedSearchPosts{
1329
1376
interfaceParamsextendsTypedBase{
1330
1377
/** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
0 commit comments