This package has been deprecated

Author message:

This package is no longer maintained. As a replacement, consider using Plandoc: https://www.npmjs.com/package/plandoc

tripledoc-solid-helpers
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

tripledoc-solid-helpers

TODO

Installation

npm install tripledoc solid-auth-client tripledoc-solid-helpers

Usage

// TODO

Changelog

See CHANGELOG.

License

MIT © Inrupt

#API

Index

Functions

Functions

fetchCurrentUser

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

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

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

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.

Readme

Keywords

Package Sidebar

Install

npm i tripledoc-solid-helpers

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

53 kB

Total Files

26

Last publish

Collaborators

  • vincenttunru