def get_folders(self, limit=None, *, query=None, order_by=None):
if self.root:<EOL><INDENT>url = self.build_url(self._endpoints.get('<STR_LIT>'))<EOL><DEDENT>else:<EOL><INDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(id=self.folder_id))<EOL><DEDENT>params = {}<EOL>if limit:<EOL><INDENT>params['<STR_LIT>'] = limit<EOL><DEDENT>if order_by:<EOL><INDENT>params['<STR_LIT>'] = order_by<EOL><DEDENT>if query:<EOL><INDENT>if isinstance(query, str):<EOL><INDENT>params['<STR_LIT>'] = query<EOL><DEDENT>else:<EOL><INDENT>params.update(query.as_params())<EOL><DEDENT><DEDENT>response = self.con.get(url, params=params or None)<EOL>if not response:<EOL><INDENT>return []<EOL><DEDENT>data = response.json()<EOL>return [self.__class__(parent=self, **{self._cloud_data_key: folder})<EOL>for folder in data.get('<STR_LIT:value>', [])]<EOL>
Returns a list of child folders

        :param int limit: max no. of folders to get. Over 999 uses batch.
        :param query: applies a OData filter to the request
        :type query: Query or str
        :param order_by: orders the result set based on this condition
        :type order_by: Query or str
        :return: list of folders
        :rtype: list[ContactFolder]