def list_templates(self, **kwargs): """ Retrieve list of existing templates created by owner of API-key Optional parameters are translated into query-modifiers Note that list() returns abbreviated form of templates. Use get() to retrieve full template. API call used is v1/template/headers (GET) @type pageSize: int @param pageSize: Maximum length of list to return [Optional; Default = 10] @type page: int @param page: 1-based index of page into list, based on page_size [Optional; Default = 1] @type order: string @param order: Name of field on which to sort list [Optional; From (ID, Name, Created, Updated)] @type direction: string @param direction: Direction which to sort list [Optional; From (ASC, DESC)] @return: List of template.Template instances """ temp_template = Template(api_client=self.api_client) return temp_template.list(**kwargs)
def template_list(): templates = Template.list() return success({"data": [x.json() for x in templates]})