1 | import { AuthenticateRequest } from "./requests";
|
2 | import { NoticeService, TeamNoticeService, TeamService, TopicService, UserService } from "./services";
|
3 | export declare class NoticebordClient {
|
4 | readonly token: string;
|
5 | readonly baseUrl: string;
|
6 | static readonly defaultBaseUrl = "https://noticebord.space/api";
|
7 | |
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | constructor(token?: string, baseUrl?: string);
|
23 | /**
|
24 | * Gets a bearer token from the API.
|
25 | *
|
26 | * @param {AuthenticateRequest} request The request to authenticate with.
|
27 | * @param {string} baseUrl Base URL of the API
|
28 | *
|
29 | * @example
|
30 | * const token = await NoticebordClient.getToken({
|
31 | * email: "",
|
32 | * password: "",
|
33 | * deviceName: ""
|
34 | * });
|
35 | *
|
36 | * const client = new NoticebordClient(token);
|
37 | *
|
38 | * client.users.fetchCurrentUser().then(user => {
|
39 | * console.log(user);
|
40 | * });
|
41 | */
|
42 | static getToken(request: AuthenticateRequest, baseUrl?: string): Promise<string>;
|
43 | get notices(): NoticeService;
|
44 | get teams(): TeamService;
|
45 | get teamNotices(): TeamNoticeService;
|
46 | get topics(): TopicService;
|
47 | get users(): UserService;
|
48 | }
|