Added universal search function which passes testing#148
Added universal search function which passes testing#148sean-bailey wants to merge 8 commits intobisguzar:masterfrom
Conversation
|
Awesome! Thanks for your support, I was thinking about it. But we should use get_tweets function instead creating new one , in my opinion. We can get search filters as args, what do you think? |
|
I considered that! I was concerned about the limit of arguments in the get_tweets as it was either hashtag or user. How about this: Have two different arguments: "searchterm" and "username", that way we keep a single "get_tweets()" but get the functionality of focusing on either user profiles or "everything else", which naturally would encapsulate the hashtag? That's a pretty quick and easy modification. What do you think @bisguzar ? |
|
Sounds good, we just can not break current API, for backward compatibility. İts easy to handle hashtags and usernames, because of first char (#) of hashtags. The other args (like contains, until, since, etc...) will be optional. If they are defined, we will progress it on search URL, otherwise current function handle it. I'm looking for your commits exitedly! |
|
Perfect! I removed the separate search function as we discussed and integrated it in to the existing |
|
Hi again Sean, and thanks again ofc... It is looking great! I'm sorry for latency. Just having busy days... I saw two things, I want to tell these things. First, the tests still exists from previous function. It doesn't matter anything. I can delete it before merging, nvm. The second one is, name of parameters. In python, we are don't like camelCase in variable names as you know. I will test your changes ASAP |
|
No camelCase? No problem! Switched it to underscore_case for extended variables (and to prevent a conflict with existing variable username) |
|
I am also excited for this feature! |
|
Ah, I know guys. I'm pretty fast... |
sean-bailey
left a comment
There was a problem hiding this comment.
I like the raise RuntimeError responses to the query and search! Excellent. This is approved on my end.
This was a really simple addition! By taking the existing hashtag and user query search functions, I copied the guts from those and now added the ability for users to search for any string they want on Twitter using the same API.
Added proper documentation, unit testing, and output.