Never Mix API fetching logic with the views. Create a separate service for sending requests to the API