askql icon indicating copy to clipboard operation
askql copied to clipboard

Provide a method with all available Resources listed

Open czerwinskilukasz1 opened this issue 4 years ago • 1 comments

In order to provide Developer Support functionalities, such as https://github.com/xFAANG/askql/issues/360, we need a method which returns a list of available resources. For each of resources it should return at least:

  • resource name
  • resource return type
  • a list of arguments ((type, name) pairs),

where 'type' means an AskScript type.

czerwinskilukasz1 avatar Jul 08 '20 13:07 czerwinskilukasz1

Hi @czerwinskilukasz1 ! It is not clear to me where the listed informations, in particular the the one about the arguments, would be available. I've been looking at the content of resource(), I get something like this {"name":"resource","type":{"name":"any","prototype":null},"argsType":{"name":"any!","prototype":null}} for a given resource, but it seemed to lack info about the resource arguments, in particular the list of arguments. So I also took a look into the content of askscript.grammar.pegjs.classes file, but I didn't find the info I was looking for. Is it something that remains to be implemented (add some more info somewhere in the code about the resource) or did you have already an idea where to look for these informations (and maybe I did not search properly)? Thank you!

cpelican avatar Oct 03 '20 13:10 cpelican