-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbookmarks.ts
More file actions
83 lines (71 loc) · 1.88 KB
/
Copy pathbookmarks.ts
File metadata and controls
83 lines (71 loc) · 1.88 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// SPDX-FileCopyrightText: 2026 Xquik contributors
//
// SPDX-License-Identifier: Apache-2.0
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import * as Shared from '../shared';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
/**
* Look up, search, and analyze individual tweets
*/
export class Bookmarks extends APIResource {
/**
* Get bookmarked tweets
*
* @example
* ```ts
* const paginatedTweets = await client.x.bookmarks.list();
* ```
*/
list(
query: BookmarkListParams | null | undefined = {},
options?: RequestOptions,
): APIPromise<Shared.PaginatedTweets> {
return this._client.get('/x/bookmarks', { query, ...options });
}
/**
* Get bookmark folders
*
* @example
* ```ts
* const response = await client.x.bookmarks.retrieveFolders();
* ```
*/
retrieveFolders(options?: RequestOptions): APIPromise<BookmarkRetrieveFoldersResponse> {
return this._client.get('/x/bookmarks/folders', options);
}
}
export interface BookmarkRetrieveFoldersResponse {
folders: Array<BookmarkRetrieveFoldersResponse.Folder>;
/**
* Always false for the current bookmark folder route
*/
has_next_page: boolean;
/**
* Always empty for the current bookmark folder route
*/
next_cursor: string;
}
export namespace BookmarkRetrieveFoldersResponse {
export interface Folder {
id: string;
name: string;
}
}
export interface BookmarkListParams {
/**
* Pagination cursor for bookmarks
*/
cursor?: string;
/**
* Optional bookmark folder ID
*/
folderId?: string;
}
export declare namespace Bookmarks {
export {
type BookmarkRetrieveFoldersResponse as BookmarkRetrieveFoldersResponse,
type BookmarkListParams as BookmarkListParams,
};
}