-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.check.ts
40 lines (40 loc) · 981 Bytes
/
typings.check.ts
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
29
30
31
32
33
34
35
36
37
38
39
40
import { IClient } from "./typings";
declare const client: IClient;
client.group("123").get({
fields: ["cover"],
});
async function getGroup() {
const group = await client.group("111").get();
group.name.charAt(0);
}
async function getFeed() {
let isFinish = false;
do {
let feed = await client
.group("123")
.feed()
.get({
fields: ["id"],
});
feed.map((post) => {
post.id.charAt(0);
});
feed = await feed.next();
isFinish = !!feed;
} while (!isFinish);
for await (const place of client.search().read({
type: "place",
fields: ["id"],
})) {
place.about.toLocaleLowerCase();
}
}
async function getMe() {
const user = await client.me().get();
user.first_name.toLowerCase();
const user2 = await client.me().get({ fields: ["name"] });
user2.name.toUpperCase();
}
getGroup();
getFeed();
getMe();