Class AtlasOrganization

Hierarchy

  • BaseAtlasClass<OrganizationInfo>
    • AtlasOrganization

Constructors

Properties

_attr: undefined | OrganizationInfo
attributePromise: undefined | Promise<OrganizationInfo>
id: string
viewer: AtlasViewer

Accessors

  • get attr(): undefined | AttributesType
  • returns the object's information; this may be undefined

    Returns undefined | AttributesType

Methods

  • Parameters

    • endpoint: string
    • method: "GET" | "POST"
    • payload: Payload = null
    • headers: null | Record<string, string> = null

    Returns Promise<null | string | any[] | Record<string, any> | Uint8Array | Table<any>>

  • Fetches basic information about the object. By default, this caches the call; if you want to bust the cache, pass true as the first argument. This immediately.

    Parameters

    • bustCache: boolean = false

      Whether to refetch the relevant information

    Returns Promise<OrganizationInfo>

    A promise that resolves to the organization info.

  • Returns Promise<{
        connector_name?: string;
        created_timestamp: string;
        creator: string;
        creator_nickname: string;
        creator_picture: string;
        description: string;
        id: string;
        is_public: boolean;
        is_public_to_org: boolean;
        modality?: string;
        nickname: string;
        organization_name: string;
        organization_slug: string;
        owner: string;
        project_fields: string[];
        project_name: string;
        slug: string;
        thumbnail: string;
        total_datums_in_project: number;
        unique_id_field: string;
    }[]>

  • Loads the information associated with the class, removing any existing caches.

    Returns Promise<LoadedObject<AtlasOrganization, OrganizationInfo>>

    a LoadedObject instance of the class that is guaranteed to have its attr slot populated with appropriate information.

    Example

    const loadedProject = await (new AtlasProject(projectId)).withLoadedAttributes()

    // OR, in cases where we want to do stuff immediately with the project and ensure
    // that later calls there don't double-fetch information.

    const project = new AtlasProject(projectId)

    // do stuff right away.
    const projection = new AtlasProjection(projectionId, {project: project})
    const loadedProjection = await projection.withLoadedAttributes()
    // do stuff with loadedProjection