Skip to main content

Fetch Profiles

This section covers how to fetch profiles from the Subsocial blockchain.

Find and load a single profile

api.base.findProfileSpace(id: AnyAccountId): Promise<RawSpaceData | undefined>

Example:

api.base.findProfileSpace('3osmnRNnrcScHsgkTJH1xyBF5kGjpbWHsGrqM31BJpy4vwn8')

Output:

{
"struct": {
"id": 12168,
"created": {
"account": "3pje7zib32ZA2h61dkCH3Rw4q9PPsoYyEGQ9gPZpNRFHQFnq",
"block": 639386,
"time": 1603970334000
},
"edited": false,
"owner": "3pje7zib32ZA2h61dkCH3Rw4q9PPsoYyEGQ9gPZpNRFHQFnq",
"content": {
"ipfs": "0x62616679726569623569746469763462656262716f7764667170737533766f63746667696861743464716f32736f787077326a646e637376623234"
},
"hidden": false,
"permissions": null
},
"content": {
"name": "Shawn Tabrizi",
"about": "I am a developer at Parity Technologies working on Substrate!",
"image": "QmUBw1ZyV8P4jkbnhBMU734Cks7bXnRo8gQzwzyvDMbNBz"
}
}

🆃 AnyAccountId: AccountId | string