@@ -421,7 +421,7 @@ def query_async(
421421 return request_payload
422422 return self ._request (** params_d )
423423
424- def list_fields (self , keyword = None , cache = True ):
424+ def list_fields (self , keyword = None , * , cache = True ):
425425 """List MOC Server fields.
426426
427427 In the MOC Server, the fields are free. This means that anyone publishing there
@@ -458,7 +458,9 @@ def list_fields(self, keyword=None, cache=True):
458458 hips_publisher 14 CDS
459459
460460 """
461- fields_descriptions = dict (self .list_fields_async (cache = cache ).json ()[0 ])
461+ fields_descriptions = dict (
462+ self ._request (method = "GET" , url = self .URL , timeout = self .TIMEOUT , cache = cache ,
463+ params = {"get" : "example" , "fmt" : "json" }).json ()[0 ])
462464 occurrences = [
463465 int (value .split ("x" )[0 ][1 :]) for value in fields_descriptions .values ()
464466 ]
@@ -478,37 +480,6 @@ def list_fields(self, keyword=None, cache=True):
478480 ]
479481 return list_fields
480482
481- def list_fields_async (self , cache = True ):
482- """List MOC Server fields asynchronously.
483-
484- In the MOC Server, the fields are free. This means that anyone publishing there
485- can set a new field. This results in a long set of possible fields, that are
486- more or less frequent in the database.
487- This method allows to retrieve all fields currently existing, with their
488- occurrences and an example.
489-
490- Parameters
491- ----------
492- keyword : str, optional
493- A keyword to filter the output for fields that have the keyword in their
494- name. This is not case-sensitive.
495- If you don't give a keyword, you will retrieve all existing fields.
496- cache: bool, optional
497- Whether the response should be cached.
498-
499- Returns
500- -------
501- `~requests.models.Response`
502-
503- """
504- return self ._request (
505- method = "GET" ,
506- url = self .URL ,
507- timeout = self .TIMEOUT ,
508- cache = cache ,
509- params = {"get" : "example" , "fmt" : "json" },
510- )
511-
512483 def list_coordinate_systems (self ):
513484 """Return the list of coordinate systems currently available in the MOC Server.
514485
0 commit comments