🧪 add client test scripts

This commit is contained in:
kawamataryo
2023-08-18 21:43:20 +09:00
parent 02abeab4f5
commit 294be1b03b
3 changed files with 41 additions and 1 deletions

20
scripts/client.ts Normal file
View File

@@ -0,0 +1,20 @@
import { BskyClient } from "../src/lib/bskyClient"
const searchBskyUsers = async () => {
const agent = await BskyClient.createAgent({
identifier: process.env.BSKY_IDENTIFIER as string,
password: process.env.BSKY_PASSWORD as string,
})
const result = await agent.searchUser({
term: "llamaindex",
limit: 3,
})
return result
}
(async () => {
const result = await searchBskyUsers()
console.log(result)
})()