twitter-openapi-typescript
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -85,3 +85,3 @@ "use strict"; | ||
var buildTweetApiUtils = function (args) { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
var tweet = (0, exports.tweetResultsConverter)(args.result); | ||
@@ -94,4 +94,4 @@ if (tweet == null) | ||
var quoted = tweet.quotedStatusResult; | ||
var retweeted = tweet.legacy.retweetedStatusResult; | ||
var reply = (_b = (_a = args.reply) === null || _a === void 0 ? void 0 : _a.map(function (e) { return (0, exports.buildTweetApiUtils)({ result: e.tweetResults, promotedMetadata: e.promotedMetadata }); }).filter(function (e) { return e != null; })) !== null && _b !== void 0 ? _b : []; | ||
var retweeted = (_a = tweet.legacy) === null || _a === void 0 ? void 0 : _a.retweetedStatusResult; | ||
var reply = (_c = (_b = args.reply) === null || _b === void 0 ? void 0 : _b.map(function (e) { return (0, exports.buildTweetApiUtils)({ result: e.tweetResults, promotedMetadata: e.promotedMetadata }); }).filter(function (e) { return e != null; })) !== null && _c !== void 0 ? _c : []; | ||
return { | ||
@@ -109,2 +109,4 @@ raw: args.result, | ||
var tweetResultsConverter = function (tweetResults) { | ||
if (tweetResults.result == undefined) | ||
return undefined; | ||
switch (tweetResults.result.typename) { | ||
@@ -111,0 +113,0 @@ case i.TypeName.Tweet: |
{ | ||
"name": "twitter-openapi-typescript", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Implementation of Twitter internal API in TypeScript", | ||
@@ -17,3 +17,3 @@ "scripts": { | ||
"author": "fa0311", | ||
"license": "AGPL-3.0-only", | ||
"license": "custom license or AGPL-3.0-or-later", | ||
"repository": { | ||
@@ -26,3 +26,3 @@ "type": "git", | ||
"dependencies": { | ||
"twitter-openapi-typescript-generated": "^0.0.10" | ||
"twitter-openapi-typescript-generated": "^0.0.11" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
@@ -39,1 +39,8 @@ # twitter-openapi-typescript | ||
<https://github.com/fa0311/twitter-openapi-typescript/tree/master/twitter-openapi-typescript/test/api> | ||
## License | ||
This project is dual licensed. You can choose one of the following licenses: | ||
- [Custom License](./LICENSE) | ||
- [GNU Affero General Public License v3.0](./LICENSE.AGPL) |
@@ -77,3 +77,4 @@ import * as i from 'twitter-openapi-typescript-generated'; | ||
const quoted = tweet.quotedStatusResult; | ||
const retweeted = tweet.legacy.retweetedStatusResult; | ||
const retweeted = tweet.legacy?.retweetedStatusResult; | ||
const reply = | ||
@@ -95,2 +96,3 @@ args.reply | ||
export const tweetResultsConverter = (tweetResults: i.ItemResult): i.Tweet | undefined => { | ||
if (tweetResults.result == undefined) return undefined; | ||
switch (tweetResults.result.typename) { | ||
@@ -97,0 +99,0 @@ case i.TypeName.Tweet: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
258920
125
3786
46
+ Addedtwitter-openapi-typescript-generated@0.0.11(transitive)
- Removedtwitter-openapi-typescript-generated@0.0.10(transitive)