🔗外部学習資料 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 refer to the following:

Even after installing the plugin, if CORS errors persist, you can disable the browser's CORS feature 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 初期化とデータ保存(キーと値)ファイル保存 (File Saver)チュートリング (Tutoring)ai.chat (AI チャット

Last updated