x-twitter-scraper 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +5 -5
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +19 -0
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +19 -0
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +20 -1
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +20 -1
- package/resources/account.mjs.map +1 -1
- package/resources/api-keys.d.mts +20 -0
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +20 -0
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +20 -3
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +20 -3
- package/resources/api-keys.mjs.map +1 -1
- package/resources/compose.d.mts +28 -3
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts +28 -3
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.js +9 -0
- package/resources/compose.js.map +1 -1
- package/resources/compose.mjs +9 -0
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +12 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +12 -0
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js +12 -0
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs +12 -0
- package/resources/credits.mjs.map +1 -1
- package/resources/drafts.d.mts +33 -0
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +33 -0
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.js +24 -0
- package/resources/drafts.js.map +1 -1
- package/resources/drafts.mjs +24 -0
- package/resources/drafts.mjs.map +1 -1
- package/resources/draws.d.mts +46 -1
- package/resources/draws.d.mts.map +1 -1
- package/resources/draws.d.ts +46 -1
- package/resources/draws.d.ts.map +1 -1
- package/resources/draws.js +27 -0
- package/resources/draws.js.map +1 -1
- package/resources/draws.mjs +27 -0
- package/resources/draws.mjs.map +1 -1
- package/resources/events.d.mts +25 -1
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +25 -1
- package/resources/events.d.ts.map +1 -1
- package/resources/extractions.d.mts +74 -5
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +74 -5
- package/resources/extractions.d.ts.map +1 -1
- package/resources/extractions.js +36 -0
- package/resources/extractions.js.map +1 -1
- package/resources/extractions.mjs +36 -0
- package/resources/extractions.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/integrations.d.mts +77 -0
- package/resources/integrations.d.mts.map +1 -1
- package/resources/integrations.d.ts +77 -0
- package/resources/integrations.d.ts.map +1 -1
- package/resources/integrations.js +47 -0
- package/resources/integrations.js.map +1 -1
- package/resources/integrations.mjs +47 -0
- package/resources/integrations.mjs.map +1 -1
- package/resources/monitors.d.mts +46 -0
- package/resources/monitors.d.mts.map +1 -1
- package/resources/monitors.d.ts +46 -0
- package/resources/monitors.d.ts.map +1 -1
- package/resources/monitors.js +31 -0
- package/resources/monitors.js.map +1 -1
- package/resources/monitors.mjs +31 -0
- package/resources/monitors.mjs.map +1 -1
- package/resources/radar.d.mts +4 -1
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +4 -1
- package/resources/radar.d.ts.map +1 -1
- package/resources/shared.d.mts +12 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +12 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/styles.d.mts +63 -4
- package/resources/styles.d.mts.map +1 -1
- package/resources/styles.d.ts +63 -4
- package/resources/styles.d.ts.map +1 -1
- package/resources/styles.js +55 -8
- package/resources/styles.js.map +1 -1
- package/resources/styles.mjs +55 -8
- package/resources/styles.mjs.map +1 -1
- package/resources/support/tickets.d.mts +34 -0
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +34 -0
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +34 -0
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +34 -0
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/trends.d.mts +4 -1
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +4 -1
- package/resources/trends.d.ts.map +1 -1
- package/resources/trends.js +1 -1
- package/resources/trends.mjs +1 -1
- package/resources/webhooks.d.mts +54 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +54 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +36 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +36 -0
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/accounts.d.mts +59 -3
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +59 -3
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +55 -5
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +55 -5
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/bookmarks.d.mts +11 -1
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +11 -1
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/bookmarks.js +10 -0
- package/resources/x/bookmarks.js.map +1 -1
- package/resources/x/bookmarks.mjs +10 -0
- package/resources/x/bookmarks.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +118 -11
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +118 -11
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +45 -16
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +45 -16
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/index.d.mts +1 -1
- package/resources/x/communities/index.d.mts.map +1 -1
- package/resources/x/communities/index.d.ts +1 -1
- package/resources/x/communities/index.d.ts.map +1 -1
- package/resources/x/communities/index.js.map +1 -1
- package/resources/x/communities/index.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +18 -2
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +18 -2
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +16 -0
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +16 -0
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/communities/tweets.d.mts +28 -5
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +28 -5
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/communities/tweets.js +20 -6
- package/resources/x/communities/tweets.js.map +1 -1
- package/resources/x/communities/tweets.mjs +20 -6
- package/resources/x/communities/tweets.mjs.map +1 -1
- package/resources/x/dm.d.mts +19 -2
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +19 -2
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +17 -0
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +17 -0
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/followers.d.mts +8 -0
- package/resources/x/followers.d.mts.map +1 -1
- package/resources/x/followers.d.ts +8 -0
- package/resources/x/followers.d.ts.map +1 -1
- package/resources/x/followers.js +8 -0
- package/resources/x/followers.js.map +1 -1
- package/resources/x/followers.mjs +8 -0
- package/resources/x/followers.mjs.map +1 -1
- package/resources/x/index.d.mts +2 -2
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +2 -2
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/lists.d.mts +27 -6
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +27 -6
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/lists.js +23 -16
- package/resources/x/lists.js.map +1 -1
- package/resources/x/lists.mjs +23 -16
- package/resources/x/lists.mjs.map +1 -1
- package/resources/x/media.d.mts +17 -1
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +17 -1
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +16 -0
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +16 -0
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +30 -3
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +30 -3
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +27 -0
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +27 -0
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +18 -4
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +18 -4
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +18 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +18 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +18 -4
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +18 -4
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +18 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +18 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +146 -15
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +146 -15
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +74 -10
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +74 -10
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +19 -4
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +19 -4
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +19 -4
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +19 -4
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/users.d.mts +94 -21
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +94 -21
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +78 -33
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +78 -33
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +42 -6
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +42 -6
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +21 -5
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +21 -5
- package/resources/x/x.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/account.ts +20 -1
- package/src/resources/api-keys.ts +23 -3
- package/src/resources/compose.ts +32 -1
- package/src/resources/credits.ts +12 -0
- package/src/resources/drafts.ts +33 -0
- package/src/resources/draws.ts +46 -1
- package/src/resources/events.ts +25 -1
- package/src/resources/extractions.ts +74 -5
- package/src/resources/index.ts +1 -0
- package/src/resources/integrations.ts +77 -0
- package/src/resources/monitors.ts +46 -0
- package/src/resources/radar.ts +4 -1
- package/src/resources/shared.ts +12 -0
- package/src/resources/styles.ts +67 -8
- package/src/resources/support/tickets.ts +34 -0
- package/src/resources/trends.ts +4 -1
- package/src/resources/webhooks.ts +54 -0
- package/src/resources/x/accounts.ts +72 -7
- package/src/resources/x/bookmarks.ts +11 -1
- package/src/resources/x/communities/communities.ts +142 -26
- package/src/resources/x/communities/index.ts +1 -1
- package/src/resources/x/communities/join.ts +18 -2
- package/src/resources/x/communities/tweets.ts +41 -11
- package/src/resources/x/dm.ts +19 -2
- package/src/resources/x/followers.ts +8 -0
- package/src/resources/x/index.ts +2 -0
- package/src/resources/x/lists.ts +30 -22
- package/src/resources/x/media.ts +17 -1
- package/src/resources/x/profile.ts +30 -3
- package/src/resources/x/tweets/like.ts +20 -6
- package/src/resources/x/tweets/retweet.ts +20 -14
- package/src/resources/x/tweets/tweets.ts +157 -27
- package/src/resources/x/users/follow.ts +21 -10
- package/src/resources/x/users/users.ts +103 -52
- package/src/resources/x/x.ts +50 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/styles.js
CHANGED
|
@@ -11,48 +11,95 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
11
11
|
class Styles extends resource_1.APIResource {
|
|
12
12
|
/**
|
|
13
13
|
* Get cached style profile
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const styleProfile = await client.styles.retrieve('id');
|
|
18
|
+
* ```
|
|
14
19
|
*/
|
|
15
|
-
retrieve(
|
|
16
|
-
return this._client.get((0, path_1.path) `/styles/${
|
|
20
|
+
retrieve(id, options) {
|
|
21
|
+
return this._client.get((0, path_1.path) `/styles/${id}`, options);
|
|
17
22
|
}
|
|
18
23
|
/**
|
|
19
24
|
* Save style profile with custom tweets
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const styleProfile = await client.styles.update('id', {
|
|
29
|
+
* label: 'Professional Voice',
|
|
30
|
+
* tweets: [
|
|
31
|
+
* {
|
|
32
|
+
* text: 'Excited to share our latest research findings.',
|
|
33
|
+
* },
|
|
34
|
+
* ],
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
20
37
|
*/
|
|
21
|
-
update(
|
|
22
|
-
return this._client.put((0, path_1.path) `/styles/${
|
|
38
|
+
update(id, body, options) {
|
|
39
|
+
return this._client.put((0, path_1.path) `/styles/${id}`, { body, ...options });
|
|
23
40
|
}
|
|
24
41
|
/**
|
|
25
42
|
* List cached style profiles
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const styles = await client.styles.list();
|
|
47
|
+
* ```
|
|
26
48
|
*/
|
|
27
49
|
list(options) {
|
|
28
50
|
return this._client.get('/styles', options);
|
|
29
51
|
}
|
|
30
52
|
/**
|
|
31
53
|
* Delete a style profile
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* await client.styles.delete('id');
|
|
58
|
+
* ```
|
|
32
59
|
*/
|
|
33
|
-
delete(
|
|
34
|
-
return this._client.delete((0, path_1.path) `/styles/${
|
|
60
|
+
delete(id, options) {
|
|
61
|
+
return this._client.delete((0, path_1.path) `/styles/${id}`, {
|
|
35
62
|
...options,
|
|
36
63
|
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
37
64
|
});
|
|
38
65
|
}
|
|
39
66
|
/**
|
|
40
67
|
* Analyze writing style from recent tweets
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const styleProfile = await client.styles.analyze({
|
|
72
|
+
* username: 'elonmusk',
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
41
75
|
*/
|
|
42
76
|
analyze(body, options) {
|
|
43
77
|
return this._client.post('/styles', { body, ...options });
|
|
44
78
|
}
|
|
45
79
|
/**
|
|
46
80
|
* Compare two style profiles
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const response = await client.styles.compare({
|
|
85
|
+
* username1: 'username1',
|
|
86
|
+
* username2: 'username2',
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
47
89
|
*/
|
|
48
90
|
compare(query, options) {
|
|
49
91
|
return this._client.get('/styles/compare', { query, ...options });
|
|
50
92
|
}
|
|
51
93
|
/**
|
|
52
94
|
* Get engagement metrics for style tweets
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const response = await client.styles.getPerformance('id');
|
|
99
|
+
* ```
|
|
53
100
|
*/
|
|
54
|
-
getPerformance(
|
|
55
|
-
return this._client.get((0, path_1.path) `/styles/${
|
|
101
|
+
getPerformance(id, options) {
|
|
102
|
+
return this._client.get((0, path_1.path) `/styles/${id}/performance`, options);
|
|
56
103
|
}
|
|
57
104
|
}
|
|
58
105
|
exports.Styles = Styles;
|
package/resources/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE;YAC9C,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,IAAwB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAyB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,EAAU,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AAnGD,wBAmGC"}
|
package/resources/styles.mjs
CHANGED
|
@@ -8,48 +8,95 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
8
8
|
export class Styles extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Get cached style profile
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const styleProfile = await client.styles.retrieve('id');
|
|
15
|
+
* ```
|
|
11
16
|
*/
|
|
12
|
-
retrieve(
|
|
13
|
-
return this._client.get(path `/styles/${
|
|
17
|
+
retrieve(id, options) {
|
|
18
|
+
return this._client.get(path `/styles/${id}`, options);
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* Save style profile with custom tweets
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const styleProfile = await client.styles.update('id', {
|
|
26
|
+
* label: 'Professional Voice',
|
|
27
|
+
* tweets: [
|
|
28
|
+
* {
|
|
29
|
+
* text: 'Excited to share our latest research findings.',
|
|
30
|
+
* },
|
|
31
|
+
* ],
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
17
34
|
*/
|
|
18
|
-
update(
|
|
19
|
-
return this._client.put(path `/styles/${
|
|
35
|
+
update(id, body, options) {
|
|
36
|
+
return this._client.put(path `/styles/${id}`, { body, ...options });
|
|
20
37
|
}
|
|
21
38
|
/**
|
|
22
39
|
* List cached style profiles
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const styles = await client.styles.list();
|
|
44
|
+
* ```
|
|
23
45
|
*/
|
|
24
46
|
list(options) {
|
|
25
47
|
return this._client.get('/styles', options);
|
|
26
48
|
}
|
|
27
49
|
/**
|
|
28
50
|
* Delete a style profile
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* await client.styles.delete('id');
|
|
55
|
+
* ```
|
|
29
56
|
*/
|
|
30
|
-
delete(
|
|
31
|
-
return this._client.delete(path `/styles/${
|
|
57
|
+
delete(id, options) {
|
|
58
|
+
return this._client.delete(path `/styles/${id}`, {
|
|
32
59
|
...options,
|
|
33
60
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
34
61
|
});
|
|
35
62
|
}
|
|
36
63
|
/**
|
|
37
64
|
* Analyze writing style from recent tweets
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const styleProfile = await client.styles.analyze({
|
|
69
|
+
* username: 'elonmusk',
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
38
72
|
*/
|
|
39
73
|
analyze(body, options) {
|
|
40
74
|
return this._client.post('/styles', { body, ...options });
|
|
41
75
|
}
|
|
42
76
|
/**
|
|
43
77
|
* Compare two style profiles
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const response = await client.styles.compare({
|
|
82
|
+
* username1: 'username1',
|
|
83
|
+
* username2: 'username2',
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
44
86
|
*/
|
|
45
87
|
compare(query, options) {
|
|
46
88
|
return this._client.get('/styles/compare', { query, ...options });
|
|
47
89
|
}
|
|
48
90
|
/**
|
|
49
91
|
* Get engagement metrics for style tweets
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response = await client.styles.getPerformance('id');
|
|
96
|
+
* ```
|
|
50
97
|
*/
|
|
51
|
-
getPerformance(
|
|
52
|
-
return this._client.get(path `/styles/${
|
|
98
|
+
getPerformance(id, options) {
|
|
99
|
+
return this._client.get(path `/styles/${id}/performance`, options);
|
|
53
100
|
}
|
|
54
101
|
}
|
|
55
102
|
//# sourceMappingURL=styles.mjs.map
|
package/resources/styles.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.mjs","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"styles.mjs","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/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E,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,EAAU,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -7,22 +7,56 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Tickets extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a support ticket
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const ticket = await client.support.tickets.create({
|
|
14
|
+
* body: 'I am unable to connect my X account. Please help.',
|
|
15
|
+
* subject: 'Cannot connect X account',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
create(body: TicketCreateParams, options?: RequestOptions): APIPromise<TicketCreateResponse>;
|
|
12
20
|
/**
|
|
13
21
|
* Get ticket with all messages
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const ticket = await client.support.tickets.retrieve(
|
|
26
|
+
* 'messages_value',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
14
29
|
*/
|
|
15
30
|
retrieve(id: string, options?: RequestOptions): APIPromise<TicketRetrieveResponse>;
|
|
16
31
|
/**
|
|
17
32
|
* Update ticket status
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const ticket = await client.support.tickets.update('id', {
|
|
37
|
+
* status: 'resolved',
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
18
40
|
*/
|
|
19
41
|
update(id: string, body: TicketUpdateParams, options?: RequestOptions): APIPromise<TicketUpdateResponse>;
|
|
20
42
|
/**
|
|
21
43
|
* List user's support tickets
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const tickets = await client.support.tickets.list();
|
|
48
|
+
* ```
|
|
22
49
|
*/
|
|
23
50
|
list(options?: RequestOptions): APIPromise<TicketListResponse>;
|
|
24
51
|
/**
|
|
25
52
|
* Reply to a support ticket
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const response = await client.support.tickets.reply('id', {
|
|
57
|
+
* body: 'Thank you for the update.',
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
26
60
|
*/
|
|
27
61
|
reply(id: string, body: TicketReplyParams, options?: RequestOptions): APIPromise<TicketReplyResponse>;
|
|
28
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tickets.d.mts","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"tickets.d.mts","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI5F;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIlF;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIx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M,CAAC;KACpB;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;CACxC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -7,22 +7,56 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
7
7
|
export declare class Tickets extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a support ticket
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const ticket = await client.support.tickets.create({
|
|
14
|
+
* body: 'I am unable to connect my X account. Please help.',
|
|
15
|
+
* subject: 'Cannot connect X account',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
create(body: TicketCreateParams, options?: RequestOptions): APIPromise<TicketCreateResponse>;
|
|
12
20
|
/**
|
|
13
21
|
* Get ticket with all messages
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const ticket = await client.support.tickets.retrieve(
|
|
26
|
+
* 'messages_value',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
14
29
|
*/
|
|
15
30
|
retrieve(id: string, options?: RequestOptions): APIPromise<TicketRetrieveResponse>;
|
|
16
31
|
/**
|
|
17
32
|
* Update ticket status
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const ticket = await client.support.tickets.update('id', {
|
|
37
|
+
* status: 'resolved',
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
18
40
|
*/
|
|
19
41
|
update(id: string, body: TicketUpdateParams, options?: RequestOptions): APIPromise<TicketUpdateResponse>;
|
|
20
42
|
/**
|
|
21
43
|
* List user's support tickets
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const tickets = await client.support.tickets.list();
|
|
48
|
+
* ```
|
|
22
49
|
*/
|
|
23
50
|
list(options?: RequestOptions): APIPromise<TicketListResponse>;
|
|
24
51
|
/**
|
|
25
52
|
* Reply to a support ticket
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const response = await client.support.tickets.reply('id', {
|
|
57
|
+
* body: 'Thank you for the update.',
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
26
60
|
*/
|
|
27
61
|
reply(id: string, body: TicketReplyParams, options?: RequestOptions): APIPromise<TicketReplyResponse>;
|
|
28
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tickets.d.ts","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"tickets.d.ts","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAA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12
12
|
* Create a support ticket
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const ticket = await client.support.tickets.create({
|
|
17
|
+
* body: 'I am unable to connect my X account. Please help.',
|
|
18
|
+
* subject: 'Cannot connect X account',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
13
21
|
*/
|
|
14
22
|
create(body, options) {
|
|
15
23
|
return this._client.post('/support/tickets', { body, ...options });
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
26
|
* Get ticket with all messages
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const ticket = await client.support.tickets.retrieve(
|
|
31
|
+
* 'messages_value',
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
19
34
|
*/
|
|
20
35
|
retrieve(id, options) {
|
|
21
36
|
return this._client.get((0, path_1.path) `/support/tickets/${id}`, options);
|
|
22
37
|
}
|
|
23
38
|
/**
|
|
24
39
|
* Update ticket status
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const ticket = await client.support.tickets.update('id', {
|
|
44
|
+
* status: 'resolved',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
25
47
|
*/
|
|
26
48
|
update(id, body, options) {
|
|
27
49
|
return this._client.patch((0, path_1.path) `/support/tickets/${id}`, { body, ...options });
|
|
28
50
|
}
|
|
29
51
|
/**
|
|
30
52
|
* List user's support tickets
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const tickets = await client.support.tickets.list();
|
|
57
|
+
* ```
|
|
31
58
|
*/
|
|
32
59
|
list(options) {
|
|
33
60
|
return this._client.get('/support/tickets', options);
|
|
34
61
|
}
|
|
35
62
|
/**
|
|
36
63
|
* Reply to a support ticket
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const response = await client.support.tickets.reply('id', {
|
|
68
|
+
* body: 'Thank you for the update.',
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
37
71
|
*/
|
|
38
72
|
reply(id, body, options) {
|
|
39
73
|
return this._client.post((0, path_1.path) `/support/tickets/${id}/messages`, { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tickets.js","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"tickets.js","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;CACF;AArED,0BAqEC"}
|
|
@@ -7,30 +7,64 @@ import { path } from "../../internal/utils/path.mjs";
|
|
|
7
7
|
export class Tickets extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a support ticket
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const ticket = await client.support.tickets.create({
|
|
14
|
+
* body: 'I am unable to connect my X account. Please help.',
|
|
15
|
+
* subject: 'Cannot connect X account',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
create(body, options) {
|
|
12
20
|
return this._client.post('/support/tickets', { body, ...options });
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* Get ticket with all messages
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const ticket = await client.support.tickets.retrieve(
|
|
28
|
+
* 'messages_value',
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
16
31
|
*/
|
|
17
32
|
retrieve(id, options) {
|
|
18
33
|
return this._client.get(path `/support/tickets/${id}`, options);
|
|
19
34
|
}
|
|
20
35
|
/**
|
|
21
36
|
* Update ticket status
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const ticket = await client.support.tickets.update('id', {
|
|
41
|
+
* status: 'resolved',
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
22
44
|
*/
|
|
23
45
|
update(id, body, options) {
|
|
24
46
|
return this._client.patch(path `/support/tickets/${id}`, { body, ...options });
|
|
25
47
|
}
|
|
26
48
|
/**
|
|
27
49
|
* List user's support tickets
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const tickets = await client.support.tickets.list();
|
|
54
|
+
* ```
|
|
28
55
|
*/
|
|
29
56
|
list(options) {
|
|
30
57
|
return this._client.get('/support/tickets', options);
|
|
31
58
|
}
|
|
32
59
|
/**
|
|
33
60
|
* Reply to a support ticket
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const response = await client.support.tickets.reply('id', {
|
|
65
|
+
* body: 'Thank you for the update.',
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
34
68
|
*/
|
|
35
69
|
reply(id, body, options) {
|
|
36
70
|
return this._client.post(path `/support/tickets/${id}/messages`, { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tickets.mjs","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"tickets.mjs","sourceRoot":"","sources":["../../src/resources/support/tickets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oBAAoB,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;CACF"}
|
package/resources/trends.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class Trends extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Get trending topics
|
|
9
|
+
* Get regional trending topics
|
|
10
10
|
*/
|
|
11
11
|
list(query?: TrendListParams | null | undefined, options?: RequestOptions): APIPromise<TrendListResponse>;
|
|
12
12
|
}
|
|
@@ -24,6 +24,9 @@ export declare namespace TrendListResponse {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
export interface TrendListParams {
|
|
27
|
+
/**
|
|
28
|
+
* Number of trending topics to return (1-50, default 30)
|
|
29
|
+
*/
|
|
27
30
|
count?: number;
|
|
28
31
|
/**
|
|
29
32
|
* Region WOEID (1=Worldwide, 23424977=US, 23424975=UK, 23424969=Turkey)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trends.d.mts","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;CAGjC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAEvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,KAAK;QACpB,IAAI,EAAE,MAAM,CAAC;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
|
1
|
+
{"version":3,"file":"trends.d.mts","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;CAGjC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAEvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,KAAK;QACpB,IAAI,EAAE,MAAM,CAAC;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
package/resources/trends.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class Trends extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Get trending topics
|
|
9
|
+
* Get regional trending topics
|
|
10
10
|
*/
|
|
11
11
|
list(query?: TrendListParams | null | undefined, options?: RequestOptions): APIPromise<TrendListResponse>;
|
|
12
12
|
}
|
|
@@ -24,6 +24,9 @@ export declare namespace TrendListResponse {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
export interface TrendListParams {
|
|
27
|
+
/**
|
|
28
|
+
* Number of trending topics to return (1-50, default 30)
|
|
29
|
+
*/
|
|
27
30
|
count?: number;
|
|
28
31
|
/**
|
|
29
32
|
* Region WOEID (1=Worldwide, 23424977=US, 23424975=UK, 23424969=Turkey)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trends.d.ts","sourceRoot":"","sources":["../src/resources/trends.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AAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAEvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,KAAK;QACpB,IAAI,EAAE,MAAM,CAAC;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
package/resources/trends.js
CHANGED
|
@@ -8,7 +8,7 @@ const resource_1 = require("../core/resource.js");
|
|
|
8
8
|
*/
|
|
9
9
|
class Trends extends resource_1.APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Get trending topics
|
|
11
|
+
* Get regional trending topics
|
|
12
12
|
*/
|
|
13
13
|
list(query = {}, options) {
|
|
14
14
|
return this._client.get('/trends', { query, ...options });
|
package/resources/trends.mjs
CHANGED