twitter-openapi-typescript
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -162,3 +162,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var cookies, config, flag, _b; | ||
var guestCookies, cookies, config, flag, _b; | ||
var _this = this; | ||
@@ -169,9 +169,8 @@ return __generator(this, function (_c) { | ||
case 1: | ||
cookies = _c.sent(); | ||
[ | ||
guestCookies = _c.sent(); | ||
cookies = [ | ||
{ name: 'auth_token', value: authToken }, | ||
{ name: 'ct0', value: ct0 }, | ||
] | ||
.filter(function (e) { return cookies.findIndex(function (c) { return c.name == e.name; }) == -1; }) | ||
.forEach(function (e) { return cookies.push(e); }); | ||
]; | ||
guestCookies.filter(function (e) { return cookies.findIndex(function (c) { return c.name == e.name; }) == -1; }).forEach(function (e) { return cookies.push(e); }); | ||
config = { | ||
@@ -178,0 +177,0 @@ fetchApi: this.param.fetchApi || fetch, |
{ | ||
"name": "twitter-openapi-typescript", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Implementation of Twitter internal API in TypeScript", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -121,9 +121,8 @@ import * as i from 'twitter-openapi-typescript-generated'; | ||
async getClientFromCookies(ct0: string, authToken: string): Promise<TwitterOpenApiClient> { | ||
const cookies: TwitterOpenApiCookie[] = await this.getGuestSession(); | ||
[ | ||
const guestCookies: TwitterOpenApiCookie[] = await this.getGuestSession(); | ||
const cookies = [ | ||
{ name: 'auth_token', value: authToken }, | ||
{ name: 'ct0', value: ct0 }, | ||
] | ||
.filter((e) => cookies.findIndex((c) => c.name == e.name) == -1) | ||
.forEach((e) => cookies.push(e)); | ||
]; | ||
guestCookies.filter((e) => cookies.findIndex((c) => c.name == e.name) == -1).forEach((e) => cookies.push(e)); | ||
@@ -130,0 +129,0 @@ const config: i.ConfigurationParameters = { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
261563
125
3809