import { getSolidDataset, getThingAll } from "@inrupt/solid-client"; import { fetch } from "@inrupt/solid-client-authn-browser"; import { thingToTask } from "./models/task"; export const getPodTasks = async (podUrl: string) => { const tasksDataset = await getSolidDataset(`${podUrl}/tasks/default`, { fetch: fetch, }); const things = getThingAll(tasksDataset); return things.map(thingToTask); }; // export const getProfile = async (webId: string) => { // const subjects = getAllSubjects(webId); // const findValue = (predicate: string) => // subjects // .map( // subject => // getStringNoLocale(subject, predicate) || getUrl(subject, predicate) // ) // ?.filter(i => !!i)[0]; // return { // name: findValue(FOAF.name), // organization: findValue(VCARD.organization_name), // image: findValue(VCARD.hasPhoto), // }; // };