twitterapi-io-client 1.0.0 → 1.0.1
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 +2 -2
- package/dist/resources/users.d.ts +2 -1
- package/dist/resources/users.js +5 -0
- package/dist/types/users.d.ts +5 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ const client = new TwitterAPIIOClient({
|
|
|
25
25
|
| Endpoint | Method | Status | Notes |
|
|
26
26
|
|----------|--------|--------|-------|
|
|
27
27
|
| Get User Profile About | `GET /twitter/user_about` | ✅ Supported | `client.users.getUserProfileAbout(userName)` |
|
|
28
|
+
| Batch Get User Info By UserIds | `GET /twitter/user/batch_info_by_ids` | ✅ Supported | `client.users.batchGetUserInfoByUserIds(userIds)` |
|
|
28
29
|
| Get User Info | `GET /twitter/user/info` | ✅ Supported | `client.users.getUserInfo(userName)` |
|
|
29
30
|
| Get User Last Tweets | `GET /twitter/user/latest_tweets` | ✅ Supported | `client.users.getUserLatestTweets(userId?, userName?, cursor?, pageSize?, includeReplies?)` |
|
|
30
31
|
| Get User Followers | `GET /twitter/user/followers` | ✅ Supported | `client.users.getUserFollowers(userName, cursor?, pageSize?)` |
|
|
@@ -33,7 +34,6 @@ const client = new TwitterAPIIOClient({
|
|
|
33
34
|
| Check Follow Relationship | `GET /twitter/user/check_follow_relationship` | ✅ Supported | `client.users.checkFollowRelationship(sourceUserName, targetUserName)` |
|
|
34
35
|
| Search user by keyword | `GET /twitter/user/search` | ✅ Supported | `client.users.searchUserByKeyword(query, cursor?)` |
|
|
35
36
|
| Get User Verified Followers | `GET /twitter/user/verifiedFollowers` | ✅ Supported | `client.users.getUserVerifiedFollowers(userId, cursor?)` |
|
|
36
|
-
| Batch Get User Info By UserIds | `GET /twitter/user/batch` | ❌ Not Supported | - |
|
|
37
37
|
|
|
38
38
|
### ✅ List Endpoint
|
|
39
39
|
|
|
@@ -132,7 +132,7 @@ The following endpoints are marked as deprecated in the API documentation and ar
|
|
|
132
132
|
|
|
133
133
|
## Implementation Status Summary
|
|
134
134
|
|
|
135
|
-
- **Fully Supported**:
|
|
135
|
+
- **Fully Supported**: 27 endpoints (10 User endpoints + 2 List endpoints + 1 My endpoint + 5 Communities endpoints + 1 Trend endpoint + 1 Spaces endpoint + 7 Tweet endpoints)
|
|
136
136
|
- **Not Implemented**: ~16+ endpoints across multiple categories
|
|
137
137
|
|
|
138
138
|
## Contributing
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { HttpClient } from "../httpClient";
|
|
2
|
-
import type { FollowRelationshipResponse, SearchUserByKeywordResponse, UserFollowersResponse, UserFollowingsResponse, UserInfoResponse, UserLatestTweetsResponse, UserMentionsResponse, UserProfileAboutResponse, UserVerifiedFollowersResponse } from "../types/users";
|
|
2
|
+
import type { BatchUserInfoByUserIdsResponse, FollowRelationshipResponse, SearchUserByKeywordResponse, UserFollowersResponse, UserFollowingsResponse, UserInfoResponse, UserLatestTweetsResponse, UserMentionsResponse, UserProfileAboutResponse, UserVerifiedFollowersResponse } from "../types/users";
|
|
3
3
|
export declare class UsersApi {
|
|
4
4
|
private http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
6
6
|
getUserProfileAbout(userName: string): Promise<UserProfileAboutResponse>;
|
|
7
|
+
batchGetUserInfoByUserIds(userIds: string[]): Promise<BatchUserInfoByUserIdsResponse>;
|
|
7
8
|
getUserInfo(userName: string): Promise<UserInfoResponse>;
|
|
8
9
|
getUserLatestTweets(userId?: string, userName?: string, cursor?: string, pageSize?: number, includeReplies?: boolean): Promise<UserLatestTweetsResponse>;
|
|
9
10
|
getUserFollowers(userName: string, cursor?: string, pageSize?: number): Promise<UserFollowersResponse>;
|
package/dist/resources/users.js
CHANGED
|
@@ -11,6 +11,11 @@ class UsersApi {
|
|
|
11
11
|
const response = await this.http.request(`/twitter/user_about?${params.toString()}`);
|
|
12
12
|
return response;
|
|
13
13
|
}
|
|
14
|
+
async batchGetUserInfoByUserIds(userIds) {
|
|
15
|
+
const params = new URLSearchParams({ userIds: userIds.join(",") });
|
|
16
|
+
const response = await this.http.request(`/twitter/user/batch_info_by_ids?${params.toString()}`);
|
|
17
|
+
return response;
|
|
18
|
+
}
|
|
14
19
|
async getUserInfo(userName) {
|
|
15
20
|
const params = new URLSearchParams({ userName });
|
|
16
21
|
const response = await this.http.request(`/twitter/user/info?${params.toString()}`);
|
package/dist/types/users.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twitterapi-io-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A TypeScript client library for the TwitterAPI.io API",
|
|
5
5
|
"author": "jorvixsky",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,5 +28,8 @@
|
|
|
28
28
|
"@types/node": "24.10.0",
|
|
29
29
|
"typescript": "5.9.3",
|
|
30
30
|
"vitest": "4.0.15"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"url": "https://github.com/jorvixsky/twitterapi-io-client"
|
|
31
34
|
}
|
|
32
35
|
}
|