Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitter-api-v2

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-api-v2 - npm Package Compare versions

Comparing version 1.12.5 to 1.12.6

4

changelog.md

@@ -0,1 +1,5 @@

1.12.6
------
- Feat: add follow and unfollow api V1 methods (thanks to @Abdullah-Malik)
1.12.5

@@ -2,0 +6,0 @@ ------

import { UserEntitiesV1 } from './entities.v1.types';
import { TweetV1 } from './tweet.v1.types';
export interface UserV1 {

@@ -117,2 +118,11 @@ id_str: string;

}
export interface FriendshipCreateV1Params {
screen_name?: string;
user_id?: string;
follow?: boolean;
}
export interface FriendshipDestroyV1Params {
screen_name?: string;
user_id?: string;
}
export declare type UserShowV1Params = TUserIdOrScreenName & TUserObjectParams;

@@ -211,2 +221,5 @@ export declare type UserLookupV1Params = {

}
export interface FriendshipCreateOrDestroyV1 extends UserV1 {
status: TweetV1;
}
export interface FriendshipLookupV1 {

@@ -213,0 +226,0 @@ name: string;

import TwitterApiv1ReadOnly from './client.v1.read';
import { MediaStatusV1Result, MediaMetadataV1Params, MediaSubtitleV1Param, SendTweetV1Params, TUploadableMedia, TweetV1, UploadMediaV1Params, UserV1, ReportSpamV1Params, AccountSettingsV1, AccountSettingsV1Params, ProfileBannerUpdateV1Params, ProfileImageUpdateV1Params, AccountProfileV1Params, FriendshipV1, FriendshipUpdateV1Params, ListV1, ListCreateV1Params, GetListV1Params, AddOrRemoveListMembersV1Params, UpdateListV1Params } from '../types';
import { MediaStatusV1Result, MediaMetadataV1Params, MediaSubtitleV1Param, SendTweetV1Params, TUploadableMedia, TweetV1, UploadMediaV1Params, UserV1, ReportSpamV1Params, AccountSettingsV1, AccountSettingsV1Params, ProfileBannerUpdateV1Params, ProfileImageUpdateV1Params, AccountProfileV1Params, FriendshipV1, FriendshipUpdateV1Params, FriendshipCreateV1Params, FriendshipDestroyV1Params, FriendshipCreateOrDestroyV1, ListV1, ListCreateV1Params, GetListV1Params, AddOrRemoveListMembersV1Params, UpdateListV1Params } from '../types';
import { TFileHandle } from './media-helpers.v1';

@@ -50,2 +50,12 @@ /**

/**
* Follow the specified user.
* https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create
*/
createFriendship(options: Partial<FriendshipCreateV1Params>): Promise<FriendshipCreateOrDestroyV1>;
/**
* Unfollow the specified user.
* https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy
*/
destroyFriendship(options: Partial<FriendshipDestroyV1Params>): Promise<FriendshipCreateOrDestroyV1>;
/**
* Update current account settings for authenticating user.

@@ -52,0 +62,0 @@ * https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-settings

@@ -128,2 +128,16 @@ "use strict";

}
/**
* Follow the specified user.
* https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create
*/
createFriendship(options) {
return this.post('friendships/create.json', options);
}
/**
* Unfollow the specified user.
* https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy
*/
destroyFriendship(options) {
return this.post('friendships/destroy.json', options);
}
/* Account API */

@@ -130,0 +144,0 @@ /**

2

package.json
{
"name": "twitter-api-v2",
"version": "1.12.5",
"version": "1.12.6",
"description": "Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc