@tapline/client 0.2.3 → 0.2.5
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/README.md +4 -2
- package/dist/cjs/client.d.ts +2 -0
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +3 -0
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/airbnb/client.js +6 -6
- package/dist/cjs/services/airbnb/client.js.map +1 -1
- package/dist/cjs/services/airbnb/types.d.ts +1 -1
- package/dist/cjs/services/airbnb/types.d.ts.map +1 -1
- package/dist/cjs/services/geckoterminal/client.js +28 -28
- package/dist/cjs/services/geckoterminal/client.js.map +1 -1
- package/dist/cjs/services/gmgn/client.js +61 -61
- package/dist/cjs/services/gmgn/client.js.map +1 -1
- package/dist/cjs/services/goplus/client.js +3 -3
- package/dist/cjs/services/goplus/client.js.map +1 -1
- package/dist/cjs/services/ponsfamily/client.js +37 -37
- package/dist/cjs/services/ponsfamily/client.js.map +1 -1
- package/dist/cjs/services/twitter/client.d.ts +15 -0
- package/dist/cjs/services/twitter/client.d.ts.map +1 -0
- package/dist/cjs/services/twitter/client.js +32 -0
- package/dist/cjs/services/twitter/client.js.map +1 -0
- package/dist/cjs/services/twitter/index.d.ts +3 -0
- package/dist/cjs/services/twitter/index.d.ts.map +1 -0
- package/dist/cjs/services/twitter/index.js +22 -0
- package/dist/cjs/services/twitter/index.js.map +1 -0
- package/dist/cjs/services/twitter/types.d.ts +513 -0
- package/dist/cjs/services/twitter/types.d.ts.map +1 -0
- package/dist/cjs/services/twitter/types.js +4 -0
- package/dist/cjs/services/twitter/types.js.map +1 -0
- package/dist/cjs/services/youtube/client.js +11 -11
- package/dist/cjs/services/youtube/client.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/services/airbnb/client.js +6 -6
- package/dist/services/airbnb/client.js.map +1 -1
- package/dist/services/airbnb/types.d.ts +1 -1
- package/dist/services/airbnb/types.d.ts.map +1 -1
- package/dist/services/geckoterminal/client.js +28 -28
- package/dist/services/geckoterminal/client.js.map +1 -1
- package/dist/services/gmgn/client.js +61 -61
- package/dist/services/gmgn/client.js.map +1 -1
- package/dist/services/goplus/client.js +3 -3
- package/dist/services/goplus/client.js.map +1 -1
- package/dist/services/ponsfamily/client.js +37 -37
- package/dist/services/ponsfamily/client.js.map +1 -1
- package/dist/services/twitter/client.d.ts +15 -0
- package/dist/services/twitter/client.d.ts.map +1 -0
- package/dist/services/twitter/client.js +28 -0
- package/dist/services/twitter/client.js.map +1 -0
- package/dist/services/twitter/index.d.ts +3 -0
- package/dist/services/twitter/index.d.ts.map +1 -0
- package/dist/services/twitter/index.js +4 -0
- package/dist/services/twitter/index.js.map +1 -0
- package/dist/services/twitter/types.d.ts +513 -0
- package/dist/services/twitter/types.d.ts.map +1 -0
- package/dist/services/twitter/types.js +3 -0
- package/dist/services/twitter/types.js.map +1 -0
- package/dist/services/youtube/client.js +11 -11
- package/dist/services/youtube/client.js.map +1 -1
- package/package.json +3 -2
|
@@ -9,173 +9,173 @@ class PonsfamilyClient {
|
|
|
9
9
|
}
|
|
10
10
|
/** Protocol-wide launch, volume, trade and revenue totals plus the daily series behind them. Costs 2 credits. */
|
|
11
11
|
async getAnalytics() {
|
|
12
|
-
return this.base.get('/
|
|
12
|
+
return this.base.get('/v1/ponsfamily/analytics');
|
|
13
13
|
}
|
|
14
14
|
/** Community-takeover migrations: the old and new token, the deposit/claim schedule and how much has been migrated. Costs 2 credits. */
|
|
15
15
|
async listCtoMigrations() {
|
|
16
|
-
return this.base.get('/
|
|
16
|
+
return this.base.get('/v1/ponsfamily/cto-migrations');
|
|
17
17
|
}
|
|
18
18
|
/** The ETH/USD rate pons prices every launch with. Costs 2 credits. */
|
|
19
19
|
async getEthPrice() {
|
|
20
|
-
return this.base.get('/
|
|
20
|
+
return this.base.get('/v1/ponsfamily/eth-price');
|
|
21
21
|
}
|
|
22
22
|
/** Token communities ranked by market cap, burn share or real market cap. Costs 2 credits. */
|
|
23
23
|
async listForumCommunities(params) {
|
|
24
|
-
return this.base.get('/
|
|
24
|
+
return this.base.get('/v1/ponsfamily/forum/communities', { ...params });
|
|
25
25
|
}
|
|
26
26
|
/** One token community with its supply, burn and market-cap figures. Costs 2 credits. */
|
|
27
27
|
async getForumCommunity(params) {
|
|
28
28
|
const { slug } = params;
|
|
29
|
-
return this.base.get(`/
|
|
29
|
+
return this.base.get(`/v1/ponsfamily/forum/communities/${encodeURIComponent(slug)}`);
|
|
30
30
|
}
|
|
31
31
|
/** A wallet's balance in a community token and the posting tier that balance earns it. Costs 2 credits. */
|
|
32
32
|
async getForumHolding(params) {
|
|
33
33
|
const { token, wallet } = params;
|
|
34
|
-
return this.base.get(`/
|
|
34
|
+
return this.base.get(`/v1/ponsfamily/forum/holdings/${encodeURIComponent(token)}/${encodeURIComponent(wallet)}`);
|
|
35
35
|
}
|
|
36
36
|
/** The memestock board: US market session state, the community ticker rows and the equities they track. Costs 2 credits. */
|
|
37
37
|
async getForumMarket() {
|
|
38
|
-
return this.base.get('/
|
|
38
|
+
return this.base.get('/v1/ponsfamily/forum/market');
|
|
39
39
|
}
|
|
40
40
|
/** The memestock forum feed, optionally narrowed to one token community. Costs 2 credits. */
|
|
41
41
|
async listForumPosts(params) {
|
|
42
|
-
return this.base.get('/
|
|
42
|
+
return this.base.get('/v1/ponsfamily/forum/posts', { ...params });
|
|
43
43
|
}
|
|
44
44
|
/** One forum post with its vote counts and community metadata. Costs 2 credits. */
|
|
45
45
|
async getForumPost(params) {
|
|
46
46
|
const { post_id } = params;
|
|
47
|
-
return this.base.get(`/
|
|
47
|
+
return this.base.get(`/v1/ponsfamily/forum/posts/${encodeURIComponent(post_id)}`);
|
|
48
48
|
}
|
|
49
49
|
/** The comment thread under a forum post. Costs 2 credits. */
|
|
50
50
|
async getForumPostComments(params) {
|
|
51
51
|
const { post_id, ...query } = params;
|
|
52
|
-
return this.base.get(`/
|
|
52
|
+
return this.base.get(`/v1/ponsfamily/forum/posts/${encodeURIComponent(post_id)}/comments`, query);
|
|
53
53
|
}
|
|
54
54
|
/** The pons launchpad explore board: tokens still climbing the bonding curve plus a page of graduated tokens. Costs 2 credits. */
|
|
55
55
|
async listLaunches(params) {
|
|
56
|
-
return this.base.get('/
|
|
56
|
+
return this.base.get('/v1/ponsfamily/launches', { ...params });
|
|
57
57
|
}
|
|
58
58
|
/** The graduated tokens as full launch records, the catalog view of the graduations feed. Costs 2 credits. */
|
|
59
59
|
async listGraduatedCatalog() {
|
|
60
|
-
return this.base.get('/
|
|
60
|
+
return this.base.get('/v1/ponsfamily/launches/graduated');
|
|
61
61
|
}
|
|
62
62
|
/** Every graduation event pons has observed, as token address and graduation block. Costs 2 credits. */
|
|
63
63
|
async listGraduations() {
|
|
64
|
-
return this.base.get('/
|
|
64
|
+
return this.base.get('/v1/ponsfamily/launches/graduations');
|
|
65
65
|
}
|
|
66
66
|
/** Live price and graduation-progress snapshot for the launches currently trading. Costs 2 credits. */
|
|
67
67
|
async listLiveMarkets(params) {
|
|
68
|
-
return this.base.get('/
|
|
68
|
+
return this.base.get('/v1/ponsfamily/launches/live-markets', { ...params });
|
|
69
69
|
}
|
|
70
70
|
/** Search every pons launch by name, symbol or contract address. Costs 2 credits. */
|
|
71
71
|
async searchLaunches(params) {
|
|
72
|
-
return this.base.get('/
|
|
72
|
+
return this.base.get('/v1/ponsfamily/launches/search', { ...params });
|
|
73
73
|
}
|
|
74
74
|
/** Price, market cap, liquidity, recent trades and price points for one v1 token. Costs 2 credits. */
|
|
75
75
|
async getMarket(params) {
|
|
76
76
|
const { token, ...query } = params;
|
|
77
|
-
return this.base.get(`/
|
|
77
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}`, query);
|
|
78
78
|
}
|
|
79
79
|
/** All-time-high price for a token and the block it was set in. Costs 2 credits. */
|
|
80
80
|
async getMarketAth(params) {
|
|
81
81
|
const { token } = params;
|
|
82
|
-
return this.base.get(`/
|
|
82
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/ath`);
|
|
83
83
|
}
|
|
84
84
|
/** Supply burned for a token, in wei. Costs 2 credits. */
|
|
85
85
|
async getMarketBurned(params) {
|
|
86
86
|
const { token } = params;
|
|
87
|
-
return this.base.get(`/
|
|
87
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/burned`);
|
|
88
88
|
}
|
|
89
89
|
/** Bucketed price and volume points for a token, at the resolution the range implies. Costs 2 credits. */
|
|
90
90
|
async getMarketChart(params) {
|
|
91
91
|
const { token, ...query } = params;
|
|
92
|
-
return this.base.get(`/
|
|
92
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/chart`, query);
|
|
93
93
|
}
|
|
94
94
|
/** What the deployer did with its own allocation: buys, sells, transfers, burns, and the dumped/moved/burned verdicts. Costs 2 credits. */
|
|
95
95
|
async getDeveloperTrades(params) {
|
|
96
96
|
const { token, ...query } = params;
|
|
97
|
-
return this.base.get(`/
|
|
97
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/dev-trades`, query);
|
|
98
98
|
}
|
|
99
99
|
/** Ranked token holders with balance, supply share and per-holder PnL where pons can compute it. Costs 2 credits. */
|
|
100
100
|
async getMarketHolders(params) {
|
|
101
101
|
const { token } = params;
|
|
102
|
-
return this.base.get(`/
|
|
102
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/holders`);
|
|
103
103
|
}
|
|
104
104
|
/** Resting limit-order depth around the current price, bucketed into price bands. Costs 2 credits. */
|
|
105
105
|
async getMarketOrderDepth(params) {
|
|
106
106
|
const { token } = params;
|
|
107
|
-
return this.base.get(`/
|
|
107
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/order-depth`);
|
|
108
108
|
}
|
|
109
109
|
/** The latest observed pool price, the cheap poll the launchpad UI uses. Costs 2 credits. */
|
|
110
110
|
async getMarketTip(params) {
|
|
111
111
|
const { token } = params;
|
|
112
|
-
return this.base.get(`/
|
|
112
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/tip`);
|
|
113
113
|
}
|
|
114
114
|
/** The most recent buys and sells against a token's pool. Costs 2 credits. */
|
|
115
115
|
async getMarketTrades(params) {
|
|
116
116
|
const { token } = params;
|
|
117
|
-
return this.base.get(`/
|
|
117
|
+
return this.base.get(`/v1/ponsfamily/markets/${encodeURIComponent(token)}/trades`);
|
|
118
118
|
}
|
|
119
119
|
/** The share of supply each deployer still holds of the token it launched. Costs 2 credits. */
|
|
120
120
|
async getCreatorHoldings(body) {
|
|
121
|
-
return this.base.post('/
|
|
121
|
+
return this.base.post('/v1/ponsfamily/tokens/creator-holdings', body);
|
|
122
122
|
}
|
|
123
123
|
/** Whether each token routes its creator fees to holders. Costs 2 credits. */
|
|
124
124
|
async getFeeSharing(params) {
|
|
125
|
-
return this.base.get('/
|
|
125
|
+
return this.base.get('/v1/ponsfamily/tokens/fee-sharing', { ...params });
|
|
126
126
|
}
|
|
127
127
|
/** Resolved logo URLs keyed by lower-cased token address. Costs 2 credits. */
|
|
128
128
|
async getTokenImages(params) {
|
|
129
|
-
return this.base.get('/
|
|
129
|
+
return this.base.get('/v1/ponsfamily/tokens/images', { ...params });
|
|
130
130
|
}
|
|
131
131
|
/** Static token metadata: supply, socials, pool wiring and the deployer that launched it. Costs 2 credits. */
|
|
132
132
|
async getToken(params) {
|
|
133
133
|
const { token } = params;
|
|
134
|
-
return this.base.get(`/
|
|
134
|
+
return this.base.get(`/v1/ponsfamily/tokens/${encodeURIComponent(token)}`);
|
|
135
135
|
}
|
|
136
136
|
/** Bucketed price and volume points for a v2 launch, with the quote asset's USD rate. Costs 2 credits. */
|
|
137
137
|
async getV2MarketChart(params) {
|
|
138
138
|
const { token, ...query } = params;
|
|
139
|
-
return this.base.get(`/
|
|
139
|
+
return this.base.get(`/v1/ponsfamily/v2-markets/${encodeURIComponent(token)}/chart`, query);
|
|
140
140
|
}
|
|
141
141
|
/** Creator-fee escrow for a v2 launch: recipient, quote asset and what has been earned so far. Costs 2 credits. */
|
|
142
142
|
async getV2CreatorFees(params) {
|
|
143
143
|
const { token } = params;
|
|
144
|
-
return this.base.get(`/
|
|
144
|
+
return this.base.get(`/v1/ponsfamily/v2-markets/${encodeURIComponent(token)}/creator-fees`);
|
|
145
145
|
}
|
|
146
146
|
/** Holder fee-sharing distributor state for a v2 launch, including the latest payout epoch. Costs 2 credits. */
|
|
147
147
|
async getV2Distributor(params) {
|
|
148
148
|
const { token } = params;
|
|
149
|
-
return this.base.get(`/
|
|
149
|
+
return this.base.get(`/v1/ponsfamily/v2-markets/${encodeURIComponent(token)}/distributor`);
|
|
150
150
|
}
|
|
151
151
|
/** Ranked holders of a v2 launch. Costs 2 credits. */
|
|
152
152
|
async getV2MarketHolders(params) {
|
|
153
153
|
const { token } = params;
|
|
154
|
-
return this.base.get(`/
|
|
154
|
+
return this.base.get(`/v1/ponsfamily/v2-markets/${encodeURIComponent(token)}/holders`);
|
|
155
155
|
}
|
|
156
156
|
/** Trades against a v2 (curve) launch, quoted in the launch's own quote asset. Costs 2 credits. */
|
|
157
157
|
async getV2MarketTrades(params) {
|
|
158
158
|
const { token } = params;
|
|
159
|
-
return this.base.get(`/
|
|
159
|
+
return this.base.get(`/v1/ponsfamily/v2-markets/${encodeURIComponent(token)}/trades`);
|
|
160
160
|
}
|
|
161
161
|
/** Public pons profiles (username, avatar, bio) for the given wallets. Costs 2 credits. */
|
|
162
162
|
async getWalletIdentities(params) {
|
|
163
|
-
return this.base.get('/
|
|
163
|
+
return this.base.get('/v1/ponsfamily/wallets/identities', { ...params });
|
|
164
164
|
}
|
|
165
165
|
/** Portfolio value over time for a wallet, with the change over the requested window. Costs 2 credits. */
|
|
166
166
|
async getPortfolioChart(params) {
|
|
167
167
|
const { address, ...query } = params;
|
|
168
|
-
return this.base.get(`/
|
|
168
|
+
return this.base.get(`/v1/ponsfamily/wallets/${encodeURIComponent(address)}/portfolio-chart`, query);
|
|
169
169
|
}
|
|
170
170
|
/** A wallet's open and closed positions, its trade activity, and realized/unrealized PnL totals. Costs 2 credits. */
|
|
171
171
|
async getWalletPositions(params) {
|
|
172
172
|
const { address } = params;
|
|
173
|
-
return this.base.get(`/
|
|
173
|
+
return this.base.get(`/v1/ponsfamily/wallets/${encodeURIComponent(address)}/positions`);
|
|
174
174
|
}
|
|
175
175
|
/** The launches a wallet deployed or earns fees from, with its claimed and claimable fees on each, alongside the ETH/USD rate pons priced them with. Costs 2 credits. */
|
|
176
176
|
async getProfile(params) {
|
|
177
177
|
const { address } = params;
|
|
178
|
-
return this.base.get(`/
|
|
178
|
+
return this.base.get(`/v1/ponsfamily/wallets/${encodeURIComponent(address)}/profile`);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
exports.PonsfamilyClient = PonsfamilyClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/services/ponsfamily/client.ts"],"names":[],"mappings":";AAAA,oEAAoE;;;AAKpE,MAAa,gBAAgB;IACE;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,iHAAiH;IACjH,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAuB,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/services/ponsfamily/client.ts"],"names":[],"mappings":";AAAA,oEAAoE;;;AAKpE,MAAa,gBAAgB;IACE;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GA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C,iBAAiB,CAAC,MAA+B;QACrD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA4B,6BAA6B,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACnH,CAAC;IAED,2FAA2F;IAC3F,KAAK,CAAC,mBAAmB,CAAC,MAAiC;QACzD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA8B,mCAAmC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IACxG,CAAC;IAED,0GAA0G;IAC1G,KAAK,CAAC,iBAAiB,CAAC,MAA+B;QACrD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA4B,0BAA0B,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAClI,CAAC;IAED,qHAAqH;IACrH,KAAK,CAAC,kBAAkB,CAAC,MAAgC;QACvD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA6B,0BAA0B,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtH,CAAC;IAED,yKAAyK;IACzK,KAAK,CAAC,UAAU,CAAC,MAAwB;QACvC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAqB,0BAA0B,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5G,CAAC;CACF;AAjND,4CAiNC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BaseClient } from '../../base.js';
|
|
2
|
+
import type { GetCommunityParams, GetTweetParams, GetUserProfileByIdParams, GetUserProfileParams, TwitterCommunityResponse, TwitterProfileResponse, TwitterTweetDetailResponse } from './types.js';
|
|
3
|
+
export declare class TwitterClient {
|
|
4
|
+
private readonly base;
|
|
5
|
+
constructor(base: BaseClient);
|
|
6
|
+
/** An X (Twitter) Community as x.com shows it to logged-out visitors, as X's Community object in the shape Scrape Creators returns it: `rest_id`, name, description, member count, `created_at` (Unix milliseconds), join policy, topic, banners, rules, creator and member facepile. `tweets` adds the 20 community posts x.com ranks by likes, flattened the way Scrape Creators flattens community posts: the post's `legacy` fields plus `id`, `view_count` and the author as `user`. This is a fixed window: x.com offers no latest feed and no further pages logged-out. A logged-out viewer is not a member, so `is_member` is false and `role` is NonMember. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Costs 2 credits. */
|
|
7
|
+
getCommunity(params: GetCommunityParams): Promise<TwitterCommunityResponse>;
|
|
8
|
+
/** One X (Twitter) post as x.com shows it to logged-out visitors, as X's Tweet object in the shape Scrape Creators returns it: `rest_id`, the author under `core.user_results.result`, `legacy` (full text, created time, counts, entities with every t.co link mapped, media with video variants and bitrates, reply and quote ids), `views`, `note_tweet` with the full text of a long post, `article`, `card`, `edit_control`, and the quoted post under `quoted_status_result`. `parent_tweets` holds the posts above a reply that x.com shows logged-out, oldest first; in samples that is only the post it replies to, so follow `legacy.in_reply_to_status_id_str` to walk further up. `replies` holds the top replies x.com shows logged-out (0 to 4 in samples, not every reply); x.com offers no further reply pages logged-out. Both lists hold Tweet objects plus their `url`. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Costs 1 credit. */
|
|
9
|
+
getTweet(params: GetTweetParams): Promise<TwitterTweetDetailResponse>;
|
|
10
|
+
/** An X (Twitter) account's public profile as x.com shows it to logged-out visitors, as X's User object in the shape Scrape Creators returns it: `rest_id`, `core` (name, handle, join date), `legacy` (bio, follower, following and post counts, avatar, banner, bio link, pinned post id), `location`, `privacy`, `verification` and `is_blue_verified`. `pinned_tweet` and `tweets` add the pinned post and the newest original posts x.com shows logged-out (4 or 5 in samples) from the same page fetch, each an X Tweet object plus its `url`. This is a fixed window: x.com offers no further pages logged-out, so there is no cursor. A protected account returns its profile with no posts. Tapline caches each profile page for 2 minutes, so a profile and its posts can be up to 2 minutes old. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Looks the account up by its numeric user id. Costs 1 credit. */
|
|
11
|
+
getUserProfileById(params: GetUserProfileByIdParams): Promise<TwitterProfileResponse>;
|
|
12
|
+
/** An X (Twitter) account's public profile as x.com shows it to logged-out visitors, as X's User object in the shape Scrape Creators returns it: `rest_id`, `core` (name, handle, join date), `legacy` (bio, follower, following and post counts, avatar, banner, bio link, pinned post id), `location`, `privacy`, `verification` and `is_blue_verified`. `pinned_tweet` and `tweets` add the pinned post and the newest original posts x.com shows logged-out (4 or 5 in samples) from the same page fetch, each an X Tweet object plus its `url`. This is a fixed window: x.com offers no further pages logged-out, so there is no cursor. A protected account returns its profile with no posts. Tapline caches each profile page for 2 minutes, so a profile and its posts can be up to 2 minutes old. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Looks the account up by its handle. Costs 1 credit. */
|
|
13
|
+
getUserProfile(params: GetUserProfileParams): Promise<TwitterProfileResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/services/twitter/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAEnM,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,mrEAAmrE;IAC7qE,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAKjF,w4EAAw4E;IACl4E,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAK3E,s2EAAs2E;IACh2E,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAK3F,61EAA61E;IACv1E,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAIpF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated by generate-client from spec/openapi.json. Do not edit.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TwitterClient = void 0;
|
|
5
|
+
class TwitterClient {
|
|
6
|
+
base;
|
|
7
|
+
constructor(base) {
|
|
8
|
+
this.base = base;
|
|
9
|
+
}
|
|
10
|
+
/** An X (Twitter) Community as x.com shows it to logged-out visitors, as X's Community object in the shape Scrape Creators returns it: `rest_id`, name, description, member count, `created_at` (Unix milliseconds), join policy, topic, banners, rules, creator and member facepile. `tweets` adds the 20 community posts x.com ranks by likes, flattened the way Scrape Creators flattens community posts: the post's `legacy` fields plus `id`, `view_count` and the author as `user`. This is a fixed window: x.com offers no latest feed and no further pages logged-out. A logged-out viewer is not a member, so `is_member` is false and `role` is NonMember. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Costs 2 credits. */
|
|
11
|
+
async getCommunity(params) {
|
|
12
|
+
const { community_id } = params;
|
|
13
|
+
return this.base.get(`/v1/twitter/communities/${encodeURIComponent(community_id)}`);
|
|
14
|
+
}
|
|
15
|
+
/** One X (Twitter) post as x.com shows it to logged-out visitors, as X's Tweet object in the shape Scrape Creators returns it: `rest_id`, the author under `core.user_results.result`, `legacy` (full text, created time, counts, entities with every t.co link mapped, media with video variants and bitrates, reply and quote ids), `views`, `note_tweet` with the full text of a long post, `article`, `card`, `edit_control`, and the quoted post under `quoted_status_result`. `parent_tweets` holds the posts above a reply that x.com shows logged-out, oldest first; in samples that is only the post it replies to, so follow `legacy.in_reply_to_status_id_str` to walk further up. `replies` holds the top replies x.com shows logged-out (0 to 4 in samples, not every reply); x.com offers no further reply pages logged-out. Both lists hold Tweet objects plus their `url`. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Costs 1 credit. */
|
|
16
|
+
async getTweet(params) {
|
|
17
|
+
const { tweet_id } = params;
|
|
18
|
+
return this.base.get(`/v1/twitter/tweets/${encodeURIComponent(tweet_id)}`);
|
|
19
|
+
}
|
|
20
|
+
/** An X (Twitter) account's public profile as x.com shows it to logged-out visitors, as X's User object in the shape Scrape Creators returns it: `rest_id`, `core` (name, handle, join date), `legacy` (bio, follower, following and post counts, avatar, banner, bio link, pinned post id), `location`, `privacy`, `verification` and `is_blue_verified`. `pinned_tweet` and `tweets` add the pinned post and the newest original posts x.com shows logged-out (4 or 5 in samples) from the same page fetch, each an X Tweet object plus its `url`. This is a fixed window: x.com offers no further pages logged-out, so there is no cursor. A protected account returns its profile with no posts. Tapline caches each profile page for 2 minutes, so a profile and its posts can be up to 2 minutes old. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Looks the account up by its numeric user id. Costs 1 credit. */
|
|
21
|
+
async getUserProfileById(params) {
|
|
22
|
+
const { user_id } = params;
|
|
23
|
+
return this.base.get(`/v1/twitter/users/by-id/${encodeURIComponent(user_id)}`);
|
|
24
|
+
}
|
|
25
|
+
/** An X (Twitter) account's public profile as x.com shows it to logged-out visitors, as X's User object in the shape Scrape Creators returns it: `rest_id`, `core` (name, handle, join date), `legacy` (bio, follower, following and post counts, avatar, banner, bio link, pinned post id), `location`, `privacy`, `verification` and `is_blue_verified`. `pinned_tweet` and `tweets` add the pinned post and the newest original posts x.com shows logged-out (4 or 5 in samples) from the same page fetch, each an X Tweet object plus its `url`. This is a fixed window: x.com offers no further pages logged-out, so there is no cursor. A protected account returns its profile with no posts. Tapline caches each profile page for 2 minutes, so a profile and its posts can be up to 2 minutes old. `success`, `credits_charged` and `credits_remaining` (the wallet balance after this charge) sit at the top level of the body, as in Scrape Creators' answers. Fields x.com does not show logged-out visitors are left out, never filled with placeholder values: for example `favourites_count`, `listed_count`, `media_count` and a post's `source`. Fields that depend on the viewer hold what every logged-out viewer gets: `favorited`, `retweeted`, `bookmarked`, `relationship_perspectives`, `can_dm` and the other viewer flags are false. A post's author (`core.user_results.result`, or `user` on a community post) carries what x.com embeds with posts plus what only the author's profile page shows: `location`, the exact join date (`core.created_at`), the bio (`legacy.description` and `profile_bio`), the bio link (`legacy.url` and `legacy.entities`), the banner (`legacy.profile_banner_url`), `legacy.pinned_tweet_ids_str`, `legacy.possibly_sensitive` and `verification.verified`. They come from the author's profile in the same response when there is one, else from the author's profile page, fetched at no extra charge and cached for 2 minutes, so they can be up to 2 minutes old. Author profiles are best-effort. An author whose profile page fails or takes more than 8 seconds keeps only what x.com embeds, and its join date comes from the timestamp inside the user id, which can run up to about 25 minutes before X's own value. Accounts created before about 2016 have ids without a timestamp, so their join date is left out only if that fetch fails or times out. Looks the account up by its handle. Costs 1 credit. */
|
|
26
|
+
async getUserProfile(params) {
|
|
27
|
+
const { screen_name } = params;
|
|
28
|
+
return this.base.get(`/v1/twitter/users/${encodeURIComponent(screen_name)}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TwitterClient = TwitterClient;
|
|
32
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/services/twitter/client.ts"],"names":[],"mappings":";AAAA,oEAAoE;;;AAKpE,MAAa,aAAa;IACK;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,mrEAAmrE;IACnrE,KAAK,CAAC,YAAY,CAAC,MAA0B;QAC3C,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA2B,2BAA2B,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAChH,CAAC;IAED,w4EAAw4E;IACx4E,KAAK,CAAC,QAAQ,CAAC,MAAsB;QACnC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA6B,sBAAsB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,s2EAAs2E;IACt2E,KAAK,CAAC,kBAAkB,CAAC,MAAgC;QACvD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,2BAA2B,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,61EAA61E;IAC71E,KAAK,CAAC,cAAc,CAAC,MAA4B;QAC/C,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,qBAAqB,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC;CACF;AA1BD,sCA0BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/twitter/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated by generate-client from spec/openapi.json. Do not edit.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.TwitterClient = void 0;
|
|
19
|
+
__exportStar(require("./types.js"), exports);
|
|
20
|
+
var client_js_1 = require("./client.js");
|
|
21
|
+
Object.defineProperty(exports, "TwitterClient", { enumerable: true, get: function () { return client_js_1.TwitterClient; } });
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/twitter/index.ts"],"names":[],"mappings":";AAAA,oEAAoE;;;;;;;;;;;;;;;;;AAEpE,6CAA2B;AAC3B,yCAA4C;AAAnC,0GAAA,aAAa,OAAA"}
|