xAPI.js
  • xAPI.js
  • xAPI Wrapper Library
    • Introduction
    • Getting Started
    • The XAPI Class
    • Statement Resource
    • State Resource
    • Activity Profile Resource
    • Agent Profile Resource
    • About Resource
    • Agents Resource
    • Activities Resource
    • Helpers
    • Verbs
    • Attachment Usages
  • cmi5 Profile Library
    • Introduction
    • Getting Started
    • The Cmi5 Class
    • "cmi5 defined" Statement methods
    • "cmi5 allowed" Statement methods
    • Helpers
Powered by GitBook
On this page

Was this helpful?

  1. xAPI Wrapper Library

Attachment Usages

PreviousVerbsNextIntroduction

Last updated 4 years ago

Was this helpful?

For a non-exhaustive list of pre-made identifiers for creating statement attachments, see the enum. AttachmentUsages are a static property of the XAPI Object.

import XAPI, { Attachment } from "@xapi/xapi";

const attachment: Attachment = {
    usageType: XAPI.AttachmentUsages.SUPPORTING_MEDIA,
    display: {
        "en-US": "Image Attachment"
    },
    description: {
        "en-US": "An image of something"
    },
    contentType: "image/jpeg",
    length: imageArrayBufferByteLength,
    sha2: imageArrayBufferSHA2
};
AttachmentUsages