🔗External Learning Materials JavaScript SDK

External Learning Materials SDK

This document provides guidelines for developing external learning materials for Elice.

For any other questions, please contact Elice.

SDK Installation and Initialization

Please install the External Learning Materials JavaScript SDK as an npm package. This package is compatible with web environments.

# npm
npm install @eliceio/content-sdk --save

# yarn
yarn add @eliceio/content-sdk

Classes

You can use the EliceContents class provided by the installed SDK to utilize the necessary methods and attributes for developing external learning materials.

import { EliceContents } from '@eliceio/content-sdk';

const eliceContents = new EliceContents({
    baseUrl: 'https://api-external-contents.elice.io',
});

The options provided for initialization are as follows:

NameTypeDescription

baseUrl

string

This is the base URL of the Elice platform API server. CORS policy only allows requests from the elice.io origin. Therefore, if you are testing in a local environment, you need to configure a proxy server or disable the CORS feature in your browser.

To resolve CORS errors, please check the following:

If CORS errors continue to occur even after installing the plugin, you can disable the CORS feature in your browser using the following command in the terminal:

# Windows
chrome.exe --user-data-dir="C://chrome-dev-disabled-security" --disable-web-security --disable-site-isolation-trials

# macOS
open /Applications/Google\ Chrome.app --args --user-data-dir="/var/tmp/chrome-dev-disabled-security" --disable-web-security --disable-site-isolation-trials

# Linux
google-chrome --user-data-dir="~/chrome-dev-disabled-security" --disable-web-security --disable-site-isolation-trials
SDK Initialization and Data Storage (Key-Value)FilestoreTutoringai.chat (AI Chat

Last updated