mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-05 18:40:56 +01:00
Added created_timestamp to API
This commit is contained in:
parent
c4599bb9e9
commit
e978380753
2 changed files with 2 additions and 0 deletions
|
@ -65,6 +65,7 @@ const populateTweetProperties = async (
|
||||||
apiTweet.color = apiTweet.author.avatar_color;
|
apiTweet.color = apiTweet.author.avatar_color;
|
||||||
apiTweet.twitter_card = 'tweet';
|
apiTweet.twitter_card = 'tweet';
|
||||||
apiTweet.created_at = tweet.created_at;
|
apiTweet.created_at = tweet.created_at;
|
||||||
|
apiTweet.created_timestamp = new Date(tweet.created_at).getTime() / 1000;
|
||||||
|
|
||||||
if (tweet.lang !== 'unk') {
|
if (tweet.lang !== 'unk') {
|
||||||
apiTweet.lang = tweet.lang;
|
apiTweet.lang = tweet.lang;
|
||||||
|
|
1
src/types.d.ts
vendored
1
src/types.d.ts
vendored
|
@ -88,6 +88,7 @@ interface APITweet {
|
||||||
url: string;
|
url: string;
|
||||||
text: string;
|
text: string;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
|
created_timestamp: number;
|
||||||
|
|
||||||
likes: number;
|
likes: number;
|
||||||
retweets: number;
|
retweets: number;
|
||||||
|
|
Loading…
Add table
Reference in a new issue