twitter-api-v2
Version:
Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.
40 lines (39 loc) • 1.08 kB
TypeScript
export declare enum ETwitterStreamEvent {
ConnectionError = "connection error",
ConnectionClosed = "connection closed",
ReconnectError = "reconnect error",
ReconnectLimitExceeded = "reconnect limit exceeded",
DataKeepAlive = "data keep-alive",
Data = "data event content",
TweetParseError = "data tweet parse error",
Error = "stream error"
}
export interface TwitterApiTokens {
appKey: string;
appSecret: string;
accessToken?: string;
accessSecret?: string;
}
export interface TwitterApiBasicAuth {
username: string;
password: string;
}
export interface IClientTokenBearer {
bearerToken: string;
type: 'oauth2';
}
export interface IClientTokenBasic {
token: string;
type: 'basic';
}
export interface IClientTokenOauth {
appKey: string;
appSecret: string;
accessToken?: string;
accessSecret?: string;
type: 'oauth-1.0a';
}
export interface IClientTokenNone {
type: 'none';
}
export declare type TClientTokens = IClientTokenNone | IClientTokenBearer | IClientTokenOauth | IClientTokenBasic;