-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce OOP style of code #17
Comments
Yeah, please check the OOP branch |
I'm good w/ making script modular by using OOP but looks like @ananyo2012 you were not clear on the requirements when you wrote this, I guess by the discussion we had on discord yesterday cleared the requirements. @Rohithgilla12 @vipulgupta2048 - please refer to the discord discussion as well in case you have any doubts. So here is what we need to do -
Note - Use this module for argument parsing. |
Okay Sanchit will work on it :) |
Is anyone working on this |
You may be thinking why I am insisting OOP style in such a small script. So I start off answering the question
Why OOP ?
One of the reason I am proposing OOP is to keep the code more readable and maintainable, but the most important one is to implement Option parser.
Currently the script does 3 things
--no-follow
flag)2, Retweets and Likes the tweet
--no-comment
flag)--no-friendship
flag)Since we intend volunteers to use this as well, we should make everything optional since it is upto the user if he/she wants to follow a particular person or retweet with a comment. We should give the flexibility of usage.
Making the script Object Oriented is the first step towards making the code more modular.
How to implement OOP in this script ?
Just make a class named
ReTweeter
and move the above 4 things in separate methods. The class will look likeNote: You don't have to use the same structure. I am just proposing an initial template
The text was updated successfully, but these errors were encountered: