It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via package.json
. (Reference)
To build and compile the typescript sources to javascript use:
npm install
npm run build
navigate to the folder of your consuming project and run one of the following commands.
published:
npm install mediamask-js --save
import { MediamaskApi, Configuration } from 'mediamask-js';
const api = new MediamaskApi(
new Configuration({
accessToken: 'API_TOKEN',
})
);
api.templates().then((response) => {
console.log(response.data);
});