-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.ts
More file actions
28 lines (23 loc) · 679 Bytes
/
index.ts
File metadata and controls
28 lines (23 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import type { AppBskyActorDefs } from '@tsky/lexicons';
import { Feed } from '~/bsky/feed';
import type { Client } from '~/tsky/client';
export class Bsky {
client: Client;
constructor(client: Client) {
this.client = client;
}
/**
* Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.
*/
async profile(
identifier: string,
): Promise<AppBskyActorDefs.ProfileViewDetailed> {
const res = await this.client.get('app.bsky.actor.getProfile', {
params: { actor: identifier },
});
return res.data;
}
get feed() {
return new Feed(this.client);
}
}