import { aoEnv } from './settings.js' import { getCard } from './api.js' // Prints the text (.name) of the first card prioritized in the logged-in users member card export async function getTopPriorityText() { // Get the first priority of my member card const memberId = aoEnv('AO_CLI_SESSION_MEMBERID') if(!memberId) { return 'Not logged in' } const fetchedCards = await getCard(memberId, 'priority') if(!fetchedCards || fetchedCards.length < 2) { return 'None' } const firstPriorityCard = fetchedCards[1] return firstPriorityCard.name } // Makes an API request to get the first prioritized card in the member card of the logged-in user async function getFirstPriorityCard() { }