1.0.267 • Published 3 years ago

tweet-json-to-html-custom v1.0.267

Weekly downloads
44
License
MIT
Repository
github
Last release
3 years ago

tweet-json-to-html-custom

Forked from tweet-json-to-html converts Twitter API v2 tweet json object into html format with with styling changes

Install

npm i tweet-json-to-html-custom

Usage

Simply import the package and use it as a function:

const tweetJsonToHtml = require('tweet-json-to-html-custom')
const html = await tweetJsonToHtml(tweetJson, 'dim')

Here tweetJson should contain all possible information. Below is a sample Tweet lookup API URL requested to contain all possible information.

https://api.twitter.com/2/tweets/1295916604127981568?expansions=attachments.poll_ids,attachments.media_keys,author_id,entities.mentions.username,geo.place_id,in_reply_to_user_id,referenced_tweets.id,referenced_tweets.id.author_id&poll.fields=duration_minutes,end_datetime,id,options,voting_status&media.fields=duration_ms,height,media_key,preview_image_url,type,url,width,public_metrics&place.fields=contained_within,country,country_code,full_name,geo,id,name,place_type&tweet.fields=attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,public_metrics,possibly_sensitive,referenced_tweets,source,text,withheld&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld

tweetJsonToHtml(tweetJson, background)

Avaliable properties for background:

  • default (Default)
  • dim
  • lights-out

License

MIT License

1.0.267

3 years ago

1.0.264

3 years ago

1.0.263

3 years ago

1.0.266

3 years ago

1.0.265

3 years ago

1.0.262

3 years ago

1.0.261

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago