def get_apps(self, query_parameters=None, max_results=None):
self.clean_error()<EOL>if max_results is None:<EOL><INDENT>max_results = self.max_results<EOL><DEDENT>try:<EOL><INDENT>url = self.get_url(Constants.GET_APPS_URL)<EOL>apps = []<EOL>response = None<EOL>after_cursor = None<EOL>while (not response) or (len(apps) < max_results and after_cursor):<EOL><INDENT>response = self.execute_call('<STR_LIT>', url, params=query_parameters)<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>json_data = response.json()<EOL>if json_data and json_data.get('<STR_LIT:data>', None):<EOL><INDENT>for app_data in json_data['<STR_LIT:data>']:<EOL><INDENT>if app_data and len(apps) < max_results:<EOL><INDENT>apps.append(OneLoginApp(app_data))<EOL><DEDENT>else:<EOL><INDENT>return apps<EOL><DEDENT><DEDENT><DEDENT>after_cursor = self.get_after_cursor(response)<EOL>if after_cursor:<EOL><INDENT>if not query_parameters:<EOL><INDENT>query_parameters = {}<EOL><DEDENT>query_parameters['<STR_LIT>'] = after_cursor<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.error = str(response.status_code)<EOL>self.error_description = self.extract_error_message_from_response(response)<EOL>break<EOL><DEDENT><DEDENT>return apps<EOL><DEDENT>except Exception as e:<EOL><INDENT>self.error = <NUM_LIT><EOL>self.error_description = e.args[<NUM_LIT:0>]<EOL><DEDENT>
Gets a list of all Apps in a OneLogin account.

:param query_parameters: Parameters to filter the result of the list
:type query_parameters: dict

:param max_results: Limit the number of apps returned (optional)
:type max_results: int

Returns the list of apps
:return: app list
:rtype: list[OneLoginApp]

See https://developers.onelogin.com/api-docs/1/apps/get-apps Get Apps documentation