File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ import {
3333 followUser ,
3434 muteUser ,
3535 unmuteUser ,
36+ followUserV2 ,
37+ unfollowUserV2 ,
3638} from './relationships' ;
3739import { QueryProfilesResponse , QueryTweetsResponse } from './timeline-v1' ;
3840import { getTrends } from './trends' ;
@@ -411,6 +413,24 @@ export class Scraper {
411413 return getFollowersV2 ( userId , maxResults , this . auth ) ;
412414 }
413415
416+ /**
417+ * Follow a user using the v2 API.
418+ * @param userId The user ID to follow.
419+ * @returns A promise that resolves to the follow response.
420+ */
421+ public followUserV2 ( userId : string ) {
422+ return followUserV2 ( userId , this . auth ) ;
423+ }
424+
425+ /**
426+ * Unfollow a user using the v2 API.
427+ * @param userId The user ID to unfollow.
428+ * @returns A promise that resolves to the unfollow response.
429+ */
430+ public unfollowUserV2 ( userId : string ) {
431+ return unfollowUserV2 ( userId , this . auth ) ;
432+ }
433+
414434 /**
415435 * Fetches following profiles from Twitter.
416436 * @param userId The user whose following should be returned
You can’t perform that action at this time.
0 commit comments