Getting Spaces
#
Find and load single spaceExample:
Output:
๐ FindSpaceQuery: FindStruct < AnySpaceId >
๐ SpaceData: CommonData < Space, SpaceContent >
#
Find and load an array of spaces#
findPublicSpacesLoad an array of information about public spaces from the Subsocial blockchain and IPFS by a given array of space ids
.
A space is considered public if it meets these conditions:
- The
hidden
field on its blockchain structure isfalse
. - And there is a corresponding JSON file that represents the space's content on IPFS.
Example:
#
findUnlistedSpacesFind and load an array of information about unlisted spaces from the Subsocial blockchain and IPFS by a given array of space ids
.
A space is considered unlisted if it meets either of these conditions:
- The
hidden
field on it's blockchain structure istrue
. - Or there is no corresponding JSON file that represents the space's content on IPFS.
Example:
๐ FindSpacesQuery: FindStructs < AnySpaceId >
๐ SpaceData: CommonData < Space, SpaceContent >
๐ AnySpaceId: SpaceId | BN
#
Find and load structs and contents separately#
Get structsExample:
Output:
#
Get contentsFind and load off-chain information about spaces from IPFS by a given array cid
.
Space information only exists if there is a corresponding JSON file that represents the spaces' content on IPFS.
Example:
Output:
๐ IpfsCid: string | CID | IpfsCid
๐ ContentResult <T&>: Record<CidAsStr, T>
๐ SpaceContent: ContentFormat & { about: string; email: string; image: string; links: string[] | NamedLink[]; name: string; tags: string[] }
#
Find and load space ID by handleA handle is an alias for a space ID.
Example:
๐ ธ SpaceId
#
Find and load space IDs by ownerGet the IDs of all spaces created by a certain profile.
Example:
#
Find and load space IDs followed by accountFind IDs of all spaces that a profile is following.
Example:
๐ AnyAccountId: AccountId | string
๐ ธ SpaceId