IndianOpenSourceFoundation / dynamic-cli

A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI
https://pypi.org/project/dynamic-cli/
GNU General Public License v3.0
169 stars 120 forks source link

StackOverflow Query does not contain tags even if entered #148

Closed kushshiv closed 2 years ago

kushshiv commented 2 years ago

Issue :

StackOverflow Query does not contain tags even if entered. It should be an optional field. And should be included if Tags are entered by user. But currently it's not there in query.

Screenshot:

Tags not Entered Tags Entered
Screen Shot 2022-01-08 at 3 15 31 PM Screen Shot 2022-01-08 at 3 15 44 PM
github-actions[bot] commented 2 years ago

Hi👋 thanks for creating your first issue for IOSF, Will get back to you soon !.

lainq commented 2 years ago

Well, if I'm correct. the search result doesn't change. So i guess its not a problem

GouravSardana commented 2 years ago

I think @pranavbaburaj made this tag optional. If you doesn't enter the tag, It'll still show the result

lainq commented 2 years ago

I think @pranavbaburaj made this tag optional. If you doesn't enter the tag, It'll still show the result

Yes, removing it doesnt make a difference in the result.

kushshiv commented 2 years ago

I think @pranavbaburaj made this tag optional. If you doesn't enter the tag, It'll still show the result

Yes, removing it doesnt make a difference in the result.

yes for sure it shows the result... But my query is if we enter the tag, it should be there in the query: image

If you see in this query params tagged= remains null even if tags are entered by the user (Here I entered 'python' as tag but its not there in query param)... Optional means, if we enter the tag it should be included in tagged query params right...?? Please correct me If I am thinking in wrong direction...

GouravSardana commented 2 years ago

@pranavbaburaj you removed the tag #136

GouravSardana commented 2 years ago

May be it’s by chance you removed it

kushshiv commented 2 years ago
# ask question
for each_query in queries:
    # Be careful if there are
    # KeyBoard Interrupts or EOErrors
    try:
        prompt = Prompt(str(each_query)).prompt()
        if each_query == "Tags":
            continue
        if prompt.strip() == "": 
            SearchError(
                "\U0001F613 Input data empty", "\U0001F504 Please try again "
            )   
            sys.exit()
    except:
        sys.exit()

    query_solutions.append(prompt)

Hmm... seems in the below line, continue moved to the next iteration without executing query_solutions.append(prompt) in case of Tags...

if each_query == "Tags":
    continue
lainq commented 2 years ago

I think @pranavbaburaj made this tag optional. If you doesn't enter the tag, It'll still show the result

Yes, removing it doesnt make a difference in the result.

yes for sure it shows the result... But my query is if we enter the tag, it should be there in the query: image

If you see in this query params tagged= remains null even if tags are entered by the user (Here I entered 'python' as tag but its not there in query param)... Optional means, if we enter the tag it should be included in tagged query params right...?? Please correct me If I am thinking in wrong direction...

Oh. my bad. Can you work on a fix for this or should I?

kushshiv commented 2 years ago

I think @pranavbaburaj made this tag optional. If you doesn't enter the tag, It'll still show the result

Yes, removing it doesnt make a difference in the result.

yes for sure it shows the result... But my query is if we enter the tag, it should be there in the query: image If you see in this query params tagged= remains null even if tags are entered by the user (Here I entered 'python' as tag but its not there in query param)... Optional means, if we enter the tag it should be included in tagged query params right...?? Please correct me If I am thinking in wrong direction...

Oh. my bad. Can you work on a fix for this or should I?

I will check and will raise PR...

lainq commented 2 years ago

Thanks :)