Substack interview question

General coding question around an API request