File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 help = "Check updates for the application" ,
4747 action = "store_true" )
4848
49+ parser .add_argument ("-GET" ,
50+ help = "Make a GET request to an API" ,
51+ action = 'store_true' )
52+
4953ARGV = parser .parse_args ()
5054
5155search_flag = Search (ARGV )
Original file line number Diff line number Diff line change 88from .utility import Utility
99from .save import SaveSearchResults
1010from .update import UpdateApplication
11+ from .api_test import Api_Testing
1112
1213version = "0.1.0"
1314class Prompt ():
@@ -28,6 +29,7 @@ class Search():
2829 def __init__ (self , arguments ):
2930 self .arguments = arguments
3031 self .utility_object = Utility ()
32+ self .api_test_object = Api_Testing ()
3133
3234 def search_args (self ):
3335 if self .arguments .search :
@@ -45,6 +47,8 @@ def search_args(self):
4547 elif self .arguments .update :
4648 update = UpdateApplication (version )
4749 update .check_for_updates ()
50+ elif self .arguments .GET :
51+ self .api_test_object .get_request ()
4852
4953 def search_for_results (self , save = False ):
5054 queries = ["What do you want to search" , "Tags" ]
@@ -83,4 +87,4 @@ def search_for_results(self, save=False):
8387 filename = SaveSearchResults (data )
8488 print (
8589 colored (f"\U0001F604 Answers successfully saved into { filename } " ,
86- "green" ))
90+ "green" ))
You can’t perform that action at this time.
0 commit comments