TODO
npm install tripledoc solid-auth-client tripledoc-solid-helpers
// TODO
See CHANGELOG.
MIT © Inrupt
#API
▸ fetchCurrentUser(): Promise‹null | TripleSubject›
Fetch information about the current user.
Returns: Promise‹null | TripleSubject›
A TripleSubject that can be queried for details about the user, or null
if the user is not logged in.
▸ fetchDocumentForClass(rdfClass
: NodeRef): Promise‹TripleDocument | null›
Fetch a Document in which Subjects of a certain type are stored.
If a Document is listed in the user's Public Type Index for the given class, this function will fetch that Document. If it does not exist yet, it will initialise a new one, add it to the Public Type Index, and return the newly initialised Document.
Parameters:
Name | Type | Description |
---|---|---|
rdfClass |
NodeRef | The type of Subjects stored in this Document. |
Returns: Promise‹TripleDocument | null›
The created Document, or null
if the Document could not be found or initialised.
▸ fetchPublicTypeIndex(): Promise‹null | TripleDocument›
Fetch the current user's Public Type Index.
Returns: Promise‹null | TripleDocument›
A TripleDocument that can be queried for invidiual type registrations, or null
if the user is not logged in or has no references to such a Document.
▸ fetchUser(webId
: string): Promise‹TripleSubject›
Fetch information about a given user.
Parameters:
Name | Type | Description |
---|---|---|
webId |
string | WebID of the user to fetch |
Returns: Promise‹TripleSubject›
A TripleSubject that can be queried for details about the user.