Once url as been evaluated and all parameters are valid, we need to parse the input to create a query for all of the requested API key. Because all call are different we need a function to handle it. To make this function reusable, it should take the input schema for this API to apply the parsing
Look if we can store the lookup information inside the schema itself
Look if we need to use a lookup table
We need this parsing to be configurable easily so adding/updating a new API or data source can be made without modifying the lamda function
This parser function will also deal with he throttling for each of the API. By default we will have minimum character before we issues the query so our API will respond with an empty object. But some API will need specific throttling to reduce cost (i.e. Google API). In this case we may want more character/every 5 character, iddle time after typing, ... This throlling will be done in the parser function and not configurable from outside.
This parser function should use info from, the metadata file for each API to define how to parse, to access and to call. This way, this function is highly reusable and is configured from the schema and metadata files. So, we can add a new API
(with related files) and this function should work.
A first approach to parse the input data based on each schema is already put in place.
A more generic methodology might be implemented to have a full autonomous parsing.
Once url as been evaluated and all parameters are valid, we need to parse the input to create a query for all of the requested API key. Because all call are different we need a function to handle it. To make this function reusable, it should take the input schema for this API to apply the parsing
We need this parsing to be configurable easily so adding/updating a new API or data source can be made without modifying the lamda function
This parser function will also deal with he throttling for each of the API. By default we will have minimum character before we issues the query so our API will respond with an empty object. But some API will need specific throttling to reduce cost (i.e. Google API). In this case we may want more character/every 5 character, iddle time after typing, ... This throlling will be done in the parser function and not configurable from outside.
This parser function should use info from, the metadata file for each API to define how to parse, to access and to call. This way, this function is highly reusable and is configured from the schema and metadata files. So, we can add a new API (with related files) and this function should work.