@@ -130,7 +130,7 @@ def keywords(self):
130130 self ._keywords = None
131131
132132 def find_catalogs (self , keywords , include_obsolete = False , verbose = False ,
133- max_catalogs = None ):
133+ max_catalogs = None , return_type = 'votable' ):
134134 """
135135 Search Vizier for catalogs based on a set of keywords, e.g. author name
136136
@@ -172,7 +172,7 @@ def find_catalogs(self, keywords, include_obsolete=False, verbose=False,
172172 if max_catalogs is not None :
173173 data_payload ['-meta.max' ] = max_catalogs
174174 response = self ._request (method = 'POST' ,
175- url = self ._server_to_url (),
175+ url = self ._server_to_url (return_type = return_type ),
176176 data = data_payload ,
177177 timeout = self .TIMEOUT )
178178 if 'STOP, Max. number of RESOURCE reached' in response .text :
@@ -190,7 +190,7 @@ def find_catalogs(self, keywords, include_obsolete=False, verbose=False,
190190
191191 return result
192192
193- def get_catalogs_async (self , catalog , verbose = False ):
193+ def get_catalogs_async (self , catalog , verbose = False , return_type = 'votable' ):
194194 """
195195 Query the Vizier service for a specific catalog
196196
@@ -207,13 +207,14 @@ def get_catalogs_async(self, catalog, verbose=False):
207207
208208 data_payload = self ._args_to_payload (catalog = catalog )
209209 response = self ._request (method = 'POST' ,
210- url = self ._server_to_url (),
210+ url = self ._server_to_url (return_type = return_type ),
211211 data = data_payload ,
212212 timeout = self .TIMEOUT )
213213 return response
214214
215215 def query_object_async (self , object_name , catalog = None , radius = None ,
216- coordinate_frame = None , get_query_payload = False ):
216+ coordinate_frame = None , get_query_payload = False ,
217+ return_type = 'votable' , cache = True ):
217218 """
218219 Serves the same purpose as `query_object` but only
219220 returns the HTTP response rather than the parsed result.
@@ -256,14 +257,15 @@ def query_object_async(self, object_name, catalog=None, radius=None,
256257 if get_query_payload :
257258 return data_payload
258259 response = self ._request (method = 'POST' ,
259- url = self ._server_to_url (),
260+ url = self ._server_to_url (return_type = return_type ),
260261 data = data_payload ,
261- timeout = self .TIMEOUT )
262+ timeout = self .TIMEOUT ,
263+ cache = cache )
262264 return response
263265
264266 def query_region_async (self , coordinates , radius = None , inner_radius = None ,
265267 width = None , height = None , catalog = None ,
266- get_query_payload = False ):
268+ get_query_payload = False , cache = True ):
267269 """
268270 Serves the same purpose as `query_region` but only
269271 returns the HTTP response rather than the parsed result.
@@ -381,12 +383,15 @@ def query_region_async(self, coordinates, radius=None, inner_radius=None,
381383 return data_payload
382384
383385 response = self ._request (method = 'POST' ,
384- url = self ._server_to_url (),
386+ url = self ._server_to_url (return_type = return_type ),
385387 data = data_payload ,
386- timeout = self .TIMEOUT )
388+ timeout = self .TIMEOUT ,
389+ cache = cache )
387390 return response
388391
389- def query_constraints_async (self , catalog = None , ** kwargs ):
392+ def query_constraints_async (self , catalog = None , return_type = 'votable' ,
393+ cache = True ,
394+ ** kwargs ):
390395 """
391396 Send a query to Vizier in which you specify constraints with keyword/value
392397 pairs.
@@ -444,9 +449,10 @@ def query_constraints_async(self, catalog=None, **kwargs):
444449 column_filters = kwargs ,
445450 center = {'-c.rd' : 180 })
446451 response = self ._request (method = 'POST' ,
447- url = self ._server_to_url (),
452+ url = self ._server_to_url (return_type = return_type ),
448453 data = data_payload ,
449- timeout = self .TIMEOUT )
454+ timeout = self .TIMEOUT ,
455+ cache = cache )
450456 return response
451457
452458 def _args_to_payload (self , * args , ** kwargs ):
0 commit comments