@inrupt/solid-client / profile/webid

Module: profile/webid

Table of contents

Type aliases

Type aliases

ProfileAll

Ƭ ProfileAll<T>: Object

Type parameters

Name

Type

T

extends SolidDataset & WithServerResourceInfo

Type declaration

Name

Type

altProfileAll

SolidDataset & WithServerResourceInfo[]

webIdProfile

T

Functions

getPodUrlAll

getPodUrlAll(webId, options?): Promise<UrlString[]>

Discover the Pods an agent advertises for in their profile resources. Both the agent’s WebID and alternative profiles are fetched. Note that this function will only return URLs of Pods linked to using the pim:storage, i.e. a triple looking like <myWebid, pim:storage, myPodUrl> should appear in the profile resources.

since 1.18.0

Parameters

Name

Type

Description

webId

WebId

The WebID of the agent whose Pods should be discovered

options

Partial<typeof internal_defaultFetchOptions>

Optional parameter - options.fetch: An alternative fetch function to make the HTTP request, compatible with the browser-native fetch API.

Returns

Promise<UrlString[]>

a Promise resolving to an array containing the URLs of all the Pods linked from the agent’s profile resource using the pim:storage predicate.


getPodUrlAllFrom

getPodUrlAllFrom(profiles, webId): UrlString[]

Discover the Pods advertised for in the provided profile resources. Note that this function will only return URLs of Pods linked to using the pim:storage predicate, i.e. a triple looking like <myWebid, pim:storage, myPodUrl> should appear in the profile resources.

since 1.18.0

Parameters

Name

Type

Description

profiles

ProfileAll<SolidDataset & WithServerResourceInfo>

The profile resources in which the Pods should be discovered

webId

WebId

The WebID of the agent whose Pods should be discovered

Returns

UrlString[]

An array containing the URLs of all the Pods linked from the agent’s profile resource using the pim:storage predicate.


getProfileAll

getProfileAll<T>(webId, options?): Promise<ProfileAll<T>>

Get all the Profile Resources discoverable from a WebID Profile.

A WebID Profile may be any RDF resource on the Web, it doesn’t have to be a Solid resource. That is why, in order to expose a Solid-enabled part of their profile, some WebID profiles link to a Profile Resource, which may be a Solid resource.

since 1.16.0

Type parameters

Name

Type

T

extends Readonly<Object> & WithResourceInfo & { }

Parameters

Name

Type

Description

webId

WebId

WebID of the agent you want the profile of.

options

Partial<typeof internal_defaultFetchOptions & { webIdProfile: T }>

Optional parameter - options.webIdProfile: The data retrieved when looking up the WebID. This will be fetched if not provided. - options.fetch: An alternative fetch function to make the HTTP request, compatible with the browser-native fetch API.

Returns

Promise<ProfileAll<T>>

Promise resolving to an array of SolidDataset, each corresponding to a personal profile document discoverable from the WebID Profile Document. If none are found, the WebID profile document itself is returned.