Open gsteinLTU opened 6 years ago
From discussion on NetsBlox/NetsBlox#2159, a good idea for the maps services (once there's multiple) would be to refactor them with a new class where only the params function and base URL need to be set per-service, and some testing can be shared.
In the discussion for https://github.com/NetsBlox/Snap--Build-Your-Own-Blocks/issues/700 @hamidzr brought up the idea of having a refactored version of the Movies RPC that returns structs instead of having a million different functions.
one case for having more RPCs with simple return values is that it will make it easier for a novice programmer to use.
@gsteinLTU other than the Baidu map RPC I see you have some good changes on your fork that are not in the main repo yet. Some of the changes look simple and we should be able to merge them easily, if you make a PR I can help with it too if you want
This needs to be updated, but also, service block libraries should be updated as well. Many older services have less useful libraries and may be missing message types.
I was working on this previously in https://github.com/gsteinLTU/NetsBlox/tree/refactor. We recently added new annotations for bounded numbers and proper latitude/longitude types. It would be nice to have all the older RPCs (many of which handled input in their functions) use annotations, which also allows for adding more documentation. Even if many of these aren't used much anymore, if they're publicly available we should make a consistent standard.
And ideally we should move over as many of the API-consuming RPCs over to APIConsumer while we're working on this.
Annotations:
APIConsumer: