I think many users, including myself, would be on the free plan. Currently, users on the free plan do not have access to the v1 API endpoint. Therefore, in order to encourage more users to take advantage of this repository, I have rewritten the samples using v2.
In particular, the modification of doc/examples.md is important; simply rewriting v1 to v2 will not work. examples of working code is presented below (the former is used in this PR, but please let me know if you prefer the latter)
await client.v2.tweet({
text: 'My tweet text with two images!',
media: { media_ids: mediaIds }
});
await client.v2.tweet('My tweet text with two images!',
{
media: { media_ids: mediaIds }
});
Note: Similar updates may be needed for functions other than tweet(), but this PR focuses on the tweet() function only.
Thanks for the useful repository!!!
I think many users, including myself, would be on the free plan. Currently, users on the free plan do not have access to the v1 API endpoint. Therefore, in order to encourage more users to take advantage of this repository, I have rewritten the samples using v2.
In particular, the modification of
doc/examples.md
is important; simply rewriting v1 to v2 will not work. examples of working code is presented below (the former is used in this PR, but please let me know if you prefer the latter)Note: Similar updates may be needed for functions other than tweet(), but this PR focuses on the tweet() function only.