Closed carlitosz closed 3 years ago
What does this pull request introduce? Please describe Adding support for the statuses/oembed endpoint described in my issue #58
statuses/oembed
How did you verify that your changes work as expected? Please describe
Example Please describe how we can try out your changes
tweets.statusesOembed
url
Screenshots If applicable, add screenshots to demonstrate your changes.
My script:
async getEmbeddableTweet(url) { try { const res = await this.client.tweets.statusesOembed({ url }); return res; } catch (e) { throw e; } }
Example output:
{ "url": "https://twitter.com/Cristiano/status/1363984962270158850", "author_name": "Cristiano Ronaldo", "author_url": "https://twitter.com/Cristiano", "html": "<blockquote class=\"twitter-tweet\"><p lang=\"it\" dir=\"ltr\">Vittoria importante! Felice di aver dato il mio contributo! Avanti così ragazzi! 🚀 🏳️🏴💪🏽 <a href=\"https://t.co/FC9PCpK7bh\">pic.twitter.com/FC9PCpK7bh</a></p>— Cristiano Ronaldo (@Cristiano) <a href=\"https://twitter.com/Cristiano/status/1363984962270158850?ref_src=twsrc%5Etfw\">February 22, 2021</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n", "width": 550, "height": null, "type": "rich", "cache_age": "3153600000", "provider_name": "Twitter", "provider_url": "https://twitter.com", "version": "1.0" }
Version Which version is your changes included in?
PR Checklist Please verify that you:
package.json
What does this pull request introduce? Please describe
Adding support for the
statuses/oembed
endpoint described in my issue #58How did you verify that your changes work as expected? Please describe
Example
Please describe how we can try out your changes
tweets.statusesOembed
method passing the required parameterurl
Screenshots
If applicable, add screenshots to demonstrate your changes.
My script:
Example output:
Version
Which version is your changes included in?
PR Checklist Please verify that you:
package.json