pyIUDX.cat package¶
Submodules¶
pyIUDX.cat.cat module¶
-
class
pyIUDX.cat.cat.
Catalogue
(catUrl)[source]¶ Bases:
object
-
getAllItems
()[source]¶ Get all catalogue items :returns: List of catalogue items (dicts) :rtype: list (List[Dict])
-
getDataModel
(id)[source]¶ Get the data model for a given id :returns: List of catalogue items (dicts) :rtype: list (List[Dict])
-
getItemCount
(attributes=None, filters=None, geo=None)[source]¶ Number of items matching the criterion :param attributes: Array of key value pairs
For e.x, {“tags”: [“a”, “b”], “provider”: [“c”]}Parameters: filters (List[str]) – Array of strings as filter opts For e.x, [“id”, “provider”] Returns: number of items or -1 if fail Return type: count (int)
-
getManyResourceItems
(attributes=None, filters=None, geo=None)[source]¶ Items matching the criterion :param attributes: Array of key value pairs
For e.x, {“tags”: [“a”, “b”], “provider”: [“c”]}Parameters: filters (List[str]) – Array of strings as filter opts For e.x, [“id”, “provider”] Returns: List of catalogue items (dicts) Return type: list (List[Dict])
-
getOneResourceItem
(id, filters=None)[source]¶ Item given the id :param id: ID of the resourceItem :type id: string :param filters: Array of strings as filter opts
For e.x, [“id”, “provider”]Returns: A catalogue items (dicts) Return type: item (Dict)
-
makeOpts
(attributes=None, filters=None, geo=None)[source]¶ Make attributes options string :param attributes: Array of key value pairs
For e.x, {“tags”: [“a”, “b”], “provider”: [“c”]}Parameters: filters (List[str]) – Array of strings as filter opts For e.x, [“id”, “provider”] Returns: options as a string for a GET method Return type: opts (string)
-