Added created_timestamp to API

This commit is contained in:
dangered wolf 2022-07-26 23:50:35 -07:00
parent c4599bb9e9
commit e978380753
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58
2 changed files with 2 additions and 0 deletions

View file

@ -65,6 +65,7 @@ const populateTweetProperties = async (
apiTweet.color = apiTweet.author.avatar_color;
apiTweet.twitter_card = 'tweet';
apiTweet.created_at = tweet.created_at;
apiTweet.created_timestamp = new Date(tweet.created_at).getTime() / 1000;
if (tweet.lang !== 'unk') {
apiTweet.lang = tweet.lang;

1
src/types.d.ts vendored
View file

@ -88,6 +88,7 @@ interface APITweet {
url: string;
text: string;
created_at: string;
created_timestamp: number;
likes: number;
retweets: number;