Skip to content

Commit

Permalink
Merge pull request #90 from Rishikant181/dev
Browse files Browse the repository at this point in the history
v3.2.1-alpha.1
  • Loading branch information
Rishikant181 authored Oct 16, 2023
2 parents 02f0226 + 78b2ee6 commit 6df81e5
Show file tree
Hide file tree
Showing 8 changed files with 1,266 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rettiwt-core",
"version": "3.2.1-alpha.0",
"version": "3.2.1-alpha.1",
"description": "The core library for the reverse-engineered Twitter API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/enums/Resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ export enum EResourceType {
USER_FOLLOWERS = '/i/api/graphql/6y5TB_HrwQM0FBGDiNfoEA/Followers',
USER_LIKES = '/i/api/graphql/kgZtsNyE46T3JaEf2nF9vw/Likes',
USER_TWEETS = '/i/api/graphql/H8OOoI-5ZE4NxgRr8lfyWg/UserTweets',
USER_TWEETS_AND_REPLIES = '/i/api/graphql/GJuqLMoVxFZOvy8Oqec_9Q/UserTweetsAndReplies',
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export { Root as IUserFollowersResponse } from './types/response/user/Followers'
export { Root as IUserFollowingResponse } from './types/response/user/Following';
export { Root as IUserLikesResponse } from './types/response/user/Likes';
export { Root as IUserTweetsResponse } from './types/response/user/Tweets';
export { Root as IUserTweetsAndRepliesResponse } from './types/response/user/TweetsAndReplies';
export { Root as IUserDetailsResponse } from './types/response/user/User';

// Exporting generic raw types
Expand Down
6 changes: 5 additions & 1 deletion src/models/payloads/Args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class Args implements IArgs {
EResourceType.USER_FOLLOWING,
EResourceType.USER_LIKES,
EResourceType.USER_TWEETS,
EResourceType.USER_TWEETS_AND_REPLIES,
],
})
@IsNumberString(undefined, {
Expand All @@ -64,6 +65,7 @@ export class Args implements IArgs {
EResourceType.USER_FOLLOWING,
EResourceType.USER_LIKES,
EResourceType.USER_TWEETS,
EResourceType.USER_TWEETS_AND_REPLIES,
],
})
public id?: string;
Expand All @@ -88,7 +90,9 @@ export class Args implements IArgs {
EResourceType.USER_LIKES,
],
})
@Max(20, { groups: [EResourceType.TWEET_SEARCH, EResourceType.USER_TWEETS] })
@Max(20, {
groups: [EResourceType.TWEET_SEARCH, EResourceType.USER_TWEETS, EResourceType.USER_TWEETS_AND_REPLIES],
})
public count?: number;

/**
Expand Down
1 change: 1 addition & 0 deletions src/models/payloads/Features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class Features implements IFeatures {
public creator_subscriptions_tweet_preview_api_enabled = true;
public responsive_web_graphql_timeline_navigation_enabled = true;
public responsive_web_graphql_skip_user_profile_image_extensions_enabled = false;
public responsive_web_home_pinned_timelines_enabled = false;
public tweetypie_unmention_optimization_enabled = true;
public responsive_web_edit_tweet_api_enabled = true;
public graphql_is_translatable_rweb_tweet_is_translatable_enabled = true;
Expand Down
3 changes: 2 additions & 1 deletion src/models/payloads/Variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export class Variables implements IVariables {
resourceType == EResourceType.USER_FOLLOWERS ||
resourceType == EResourceType.USER_FOLLOWING ||
resourceType == EResourceType.USER_LIKES ||
resourceType == EResourceType.USER_TWEETS
resourceType == EResourceType.USER_TWEETS ||
resourceType == EResourceType.USER_TWEETS_AND_REPLIES
) {
this.userId = args.id;
this.count = args.count;
Expand Down
1 change: 1 addition & 0 deletions src/types/request/payloads/Features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface IFeatures {
creator_subscriptions_tweet_preview_api_enabled: boolean;
responsive_web_graphql_timeline_navigation_enabled: boolean;
responsive_web_graphql_skip_user_profile_image_extensions_enabled: boolean;
responsive_web_home_pinned_timelines_enabled: boolean;
tweetypie_unmention_optimization_enabled: boolean;
responsive_web_edit_tweet_api_enabled: boolean;
graphql_is_translatable_rweb_tweet_is_translatable_enabled: boolean;
Expand Down
Loading

0 comments on commit 6df81e5

Please sign in to comment.