|
Cookies Manager Backend
|
Functions | |
| def | create_default_template (str CMP_name, str selector) |
| def | create_multistage_template (str CMP_name, str selector_01, str selector_02) |
| def | get_detectors (str selector) |
| def | save_json (str name, str template) |
Variables | |
| string | schema |
| def | template = create_default_template("Asus", ".selector") |
| def rulegen.templates.create_default_template | ( | str | CMP_name, |
| str | selector | ||
| ) |
Creates a JSON template for rule definitions with a single stage.
Args:
CMP_name (str): The name of the Consent Management Platform.
selector (str): The CSS selector used for targeting the element.
Returns:
str: A JSON formatted string of the rule template.
| def rulegen.templates.create_multistage_template | ( | str | CMP_name, |
| str | selector_01, | ||
| str | selector_02 | ||
| ) |
Creates a JSON template for rule definitions with multiple stages using different selectors.
Args:
CMP_name (str): The name of the Consent Management Platform.
selector_01 (str): The CSS selector used for the first interaction stage.
selector_02 (str): The CSS selector used for the second interaction stage.
Returns:
str: A JSON formatted string of the multistage rule template.
| def rulegen.templates.get_detectors | ( | str | selector | ) |
Generates JSON strings for the 'presentMatcher' and 'showingMatcher' configurations.
Args:
selector (str): The CSS selector used to identify elements for the detectors.
Returns:
str: A JSON formatted string containing the configurations for both matchers.
| def rulegen.templates.save_json | ( | str | name, |
| str | template | ||
| ) |
Saves a JSON template to a file.
Args:
name (str): The filename to save the JSON template under.
template (str): The JSON formatted template string to save.
| string schema |
| template = create_default_template("Asus", ".selector") |