Resolving Precondition Issues and Implementing Authenticated API Calls in Zano
The State Changer discussed a problem related to executing a function based on the null condition of a menu ID. It was advised to remove the precondition that halted the process if the condition wasn't met. Instead, the idea was to grab the record and run a custom function if nothing was found, which would return a new menu. The custom function was renamed for clarity and returns the record from the query if the menu ID is passed, or creates it if not.
Additionally, a topic of discussion was about triggering an API call from another. The State Changer was guided on how to make an external API request depending on whether the call required an authentication or not. Steps to create an authorization header for authenticated API calls were detailed. These steps involved data manipulation and creation of variables making use of authorization headers from incoming API endpoints.
To handle slow calls while preventing waiting, it was advised to set the timeout to one second, as per Zano’s constraints. For URL copying, the 'copy URL' functionality was recommended from the other endpoint. The meeting ended with a better understanding of handling conditional scenarios and interacting with APIs effectively. The tools discussed during the meeting were functions, API calls, variables, data manipulation, preconditions, and Zano.