Skip to content

Commit

Permalink
added get_library_information, that uses get_keyword_names etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
WisniewskiP committed Jun 30, 2023
1 parent c946331 commit cf7b81f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/robotremoteserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def _register_functions(self, server):
server.register_function(self.run_keyword)
server.register_function(self.get_keyword_arguments)
server.register_function(self.get_keyword_documentation)
server.register_function(self.get_library_information)
server.register_function(self.stop_remote_server)

@property
Expand Down Expand Up @@ -189,6 +190,19 @@ def get_keyword_documentation(self, name):
'Return ``True/False`` depending was server stopped or not.')
return self._library.get_keyword_documentation(name)

def get_library_information(self):
info = dict()
for keyword in self.get_keyword_names():
info[keyword] = dict(
args=self.get_keyword_arguments(keyword),
tags=self.get_keyword_tags(keyword),
doc=self.get_keyword_documentation(keyword),
types=[]
)
info['__intro__'] = dict(doc=self.get_keyword_documentation('__intro__'))
info['__init__'] = dict(doc=self.get_keyword_documentation('__init__'))
return info

def get_keyword_tags(self, name):
if name == 'stop_remote_server':
return []
Expand Down

0 comments on commit cf7b81f

Please sign in to comment.