interface PapiFrontendProjectDataProviderService {
    get: (<ProjectInterface>(projectInterface: ProjectInterface, projectId: string, pdpFactoryId?: string) => Promise<ProjectDataProviderInterfaces[ProjectInterface]>);
}

Properties

Properties

get: (<ProjectInterface>(projectInterface: ProjectInterface, projectId: string, pdpFactoryId?: string) => Promise<ProjectDataProviderInterfaces[ProjectInterface]>)

Type declaration

    • <ProjectInterface>(projectInterface, projectId, pdpFactoryId?): Promise<ProjectDataProviderInterfaces[ProjectInterface]>
    • Get a Project Data Provider for the given project ID.

      Type Parameters

      Parameters

      • projectInterface: ProjectInterface

        projectInterface that the project to load must support. The TypeScript type for the returned project data provider will have the project data provider interface type associated with this projectInterface. If the project does not implement this projectInterface (according to its metadata), an error will be thrown.

      • projectId: string

        ID for the project to load

      • OptionalpdpFactoryId: string

        Optional ID of the PDP factory from which to get the project data provider if the PDP factory supports this project id and project interface. If not provided, then look in all available PDP factories for the given project ID.

      Returns Promise<ProjectDataProviderInterfaces[ProjectInterface]>

      Project data provider with types that are associated with the given projectInterface

      const pdp = await get('platformScripture.USFM_Verse', 'ProjectID12345');
      pdp.getVerseUSFM(new VerseRef('JHN', '1', '1'));

      If did not find a project data provider for the project id that supports the requested projectInterface (and from the requested PDP factory if specified)