Options
All
  • Public
  • Public/Protected
  • All
Menu

Using this class, you can get all the data of posts, spaces and profiles from blockchain storages and ipfs

Hierarchy

Index

Constructors

constructor

Properties

Private _ipfs

Gives access to subsocial ipfs api

Private _substrate

Gives access to subsocial substrate api

Accessors

ipfs

substrate

Methods

Private findDataArray

  • findDataArray<Id, Struct, Content>(ids: Id[], findStructs: (ids: Id[]) => Promise<Struct[]>, findContents: (cids: IpfsCid[]) => Promise<Record<string, Content>>): Promise<CommonData<Struct, Content>[]>
  • Get an array of data from blockchain storages and ipfs that is passed in the parameters of the method

    Type parameters

    Parameters

    • ids: Id[]
    • findStructs: (ids: Id[]) => Promise<Struct[]>

      gets an array of structures by ids

        • (ids: Id[]): Promise<Struct[]>
        • Parameters

          • ids: Id[]

          Returns Promise<Struct[]>

    • findContents: (cids: IpfsCid[]) => Promise<Record<string, Content>>

      gets contents by cids

        • (cids: IpfsCid[]): Promise<Record<string, Content>>
        • Parameters

          Returns Promise<Record<string, Content>>

    Returns Promise<CommonData<Struct, Content>[]>

findPost

findPosts

findProfile

findProfiles

findSpace

findSpaces