@@ -36,7 +36,7 @@ def api_proxies( self, proxies:dict)->None:
3636 self .proxies = proxies
3737
3838 def __validate_parms (self ,param :str ,value :Union [list ,int ,str ,bool ])-> dict :
39- bool_params = {'full_content' ,'image' ,'video' }
39+ bool_params = {'full_content' ,'image' ,'video' , 'cryptofeeds' }
4040 int_params = {'size' ,'timeframe' }
4141 string_params = {'q' ,'qInTitle' ,'country' ,'category' ,'language' ,'domain' ,'domainurl' ,'excludedomain' ,'timezone' ,'page' ,'from_date' ,'to_date' ,'apikey' ,'qInMeta' ,'prioritydomain' }
4242
@@ -150,7 +150,7 @@ def archive_api(
150150 language :Optional [Union [str , list ]]= None , domain :Optional [Union [str , list ]]= None , size :Optional [int ]= None ,domainurl :Optional [Union [str , list ]]= None ,
151151 excludedomain :Optional [Union [str , list ]]= None , timezone :Optional [str ]= None , full_content :Optional [bool ]= None ,image :Optional [bool ]= None ,
152152 video :Optional [bool ]= None ,prioritydomain :Optional [str ]= None , page :Optional [str ]= None , scroll :Optional [bool ]= False , max_result :Optional [int ]= None ,
153- from_date :Optional [str ]= None , to_date :Optional [str ]= None , qInMeta :Optional [str ]= None
153+ from_date :Optional [str ]= None , to_date :Optional [str ]= None , qInMeta :Optional [str ]= None , cryptofeeds : Optional [ bool ] = None
154154 ) -> dict :
155155 """
156156 Sending GET request to the archive api
@@ -159,7 +159,7 @@ def archive_api(
159159 params = {
160160 'q' :q ,'qInTitle' :qInTitle ,'country' :country ,'category' :category ,'language' :language ,'domain' :domain ,'size' :size ,'domainurl' :domainurl ,'excludedomain' :excludedomain ,
161161 'timezone' :timezone ,'full_content' :full_content ,'image' :image ,'video' :video ,'prioritydomain' :prioritydomain ,'page' :page ,'from_date' :from_date ,'to_date' :to_date ,
162- 'apikey' :self .apikey ,'qInMeta' :qInMeta
162+ 'apikey' :self .apikey ,'qInMeta' :qInMeta , 'cryptofeeds' : cryptofeeds
163163 }
164164 URL_parameters = {}
165165 for key ,value in params .items ():
@@ -174,13 +174,13 @@ def archive_api(
174174 else :
175175 return self .__get_feeds (url = f'{ constants .ARCHIVE_URL } ?{ URL_parameters_encoded } ' )
176176
177- def sources_api ( self , country :Optional [str ]= None , category :Optional [str ]= None , language :Optional [str ]= None ):
177+ def sources_api ( self , country :Optional [str ]= None , category :Optional [str ]= None , language :Optional [str ]= None , prioritydomain : Optional [ str ] = None ):
178178 """
179179 Sending GET request to the sources api
180180 For more information about parameters and input, Please visit our documentation page: https://newsdata.io/documentation
181181 """
182182 URL_parameters = {}
183- params = {"apikey" :self .apikey , "country" :country , "category" :category , "language" :language }
183+ params = {"apikey" :self .apikey , "country" :country , "category" :category , "language" :language , "prioritydomain" : prioritydomain }
184184
185185 URL_parameters = {}
186186 for key ,value in params .items ():
0 commit comments