twitter-api-v2
Advanced tools
Comparing version 1.12.6 to 1.12.7
@@ -0,5 +1,11 @@ | ||
1.12.7 | ||
------ | ||
- Fix: Fix Exception throw when response data is truthy but not an object (for example, a raw HTML page) #354 | ||
- Fix: Typing issue with `TwitterApiErrorData.errors` that can be `undefined` in some cases #357 | ||
- Feat: Add `include_rts` parameters for `.userTimeline` #349 | ||
1.12.6 | ||
------ | ||
- Feat: add follow and unfollow api V1 methods (thanks to @Abdullah-Malik) | ||
1.12.5 | ||
@@ -6,0 +12,0 @@ ------ |
@@ -39,3 +39,3 @@ /// <reference types="node" /> | ||
export interface TwitterApiErrorData { | ||
errors: (ErrorV1 | ErrorV2)[]; | ||
errors?: (ErrorV1 | ErrorV2)[]; | ||
error?: string; | ||
@@ -42,0 +42,0 @@ title?: string; |
@@ -78,3 +78,3 @@ "use strict"; | ||
// Fix bad error data payload on some v1 endpoints (see https://github.com/PLhery/node-twitter-api-v2/issues/342) | ||
if (options.data && 'error' in options.data && !options.data.errors) { | ||
if (options.data && typeof options.data === 'object' && 'error' in options.data && !options.data.errors) { | ||
const data = { ...options.data }; | ||
@@ -81,0 +81,0 @@ data.errors = [{ |
@@ -81,2 +81,3 @@ /// <reference types="node" /> | ||
screen_name?: string; | ||
include_rts?: boolean; | ||
} | ||
@@ -83,0 +84,0 @@ export interface SendTweetV1Params extends AskTweetV1Params { |
{ | ||
"name": "twitter-api-v2", | ||
"version": "1.12.6", | ||
"version": "1.12.7", | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
500325
10947