Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
363 stars 34 forks source link

Option to execute actions to Tweets from Tweet object #481

Closed MDCYT closed 5 months ago

MDCYT commented 7 months ago

It would be nice that within the object of the tweets you can execute options to these same tweets to make it faster, for example tweet.favorite(), tweet.retweet(), tweet.reply("Content", ["./image.png"])

Rishikant181 commented 7 months ago

Implementing ability to execute actions will require passing in a rettiwt instance to Tweet object, which would then lead to a change in the structure of the project.

Currently, the project targets a "separation of concerns" based structure, in which the Tweet class' only concern is deserialization of the raw tweet data into a simpler form. Adding actions will require the Tweet class to implement async functions which will utilize the rettiwt instance to make requests to Twitter, which will be contrary to the intended structure.

Sure, adding actions will be more convenient, but, the difference it makes is too small for changing the structure.