Installation
Installation
Installation
Construct an authenticated client
The default export NomadMediaSDK mirrors the Python SDK and logs in lazily on the
first call when username + password are present.
import NomadMediaSDK from "<path-to-sdk>/src/sdk.js";
const config = {
serviceApiUrl: "https://nomad-admin-api.yourdomain.com/api",
apiType: "admin", // "admin" | "portal"
username: "<from-config>", // never hard-code
password: "<from-config>", // never hard-code
debugMode: false,
};
const sdk = new NomadMediaSDK(config);
const asset = await sdk.getAsset("<asset-id>"); // login happens here on first callNotes / gotchas
- All catalog methods are async — always
awaitthem. - Method names are camelCase (
createFolderAsset,getAsset). See../reference/naming-map.md. - The SDK prints datetime lines on
console.log/console.info(one echoes the username). In a harness, mute them before constructing the SDK to keep stdout clean and avoid leaking the username. apiTypemust be"admin"for the asset/folder ops in this catalog.searchreturnsfalse(not an empty object) when there are no hits — see../reference/return-shapes.md.- See Authentication for the login/secret-hygiene rules.
