Situm SDK JS
    Preparing search index...

    Class SitumSDK

    Main class that exports different domains from the Situm REST APIs, to initialize it just pass your authentication parameters.

    To fetch information just use any of the domains (cartography, realtime, user, ...) and use the methods available in it.

    import Situm from '@situm/sdk-js';

    const situm = new SitumSDK({
    auth: {
    apikey: 'your-api-key',
    },
    };

    const buildings: Promise<readonly BuildingListElement[]> = situm.cartography.getBuildings();

    The configuration object for the SDK.

    Index

    Constructors

    Properties

    viewer: { create: (opts: ViewerOptions) => Viewer } = ...

    Viewers' Factory

    version: string = version

    Accessors

    • get authSession(): Promise<AuthSession>

      Returns the authorization object from the API base. This gives access to the user privileges, email, and organization ID.

      Returns Promise<AuthSession>

      The authorization object.

    • get jwt(): string

      Returns the JWT held by the current session, without authenticating.

      Returns string

    Methods

    • Cancels any pending session renewal. Call it when the client is replaced or no longer needed and autoRenewSession is enabled.

      Returns void

    • Returns a usable JWT, authenticating or renewing the session as needed. Prefer this over jwt when the token is about to be sent somewhere.

      Returns Promise<string>