Skip to content

added get_library_information, that uses get_keyword_names etc. #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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