@adobe/spacecat-shared-content-client
v1.2.5
Published
Shared modules of the Spacecat Services - Content Client
Downloads
986
Maintainers
Keywords
Readme
Spacecat Shared - Content Client
Overview
Development
Linting
Lint your code:
npm run lint
Cleaning
To remove node_modules
and package-lock.json
:
npm run clean
Usage
Google Drive
import { ContentClient } from '../src/index.js';
const context = {}; // Your AWS Lambda context object
const gdriveclient = await ContentClient.createFrom(context, { url: 'GOOGLE_DRIVE_URL', type: 'drive.google' });
const results = await client.getPageMetadata('/path1');
console.log(results);
import { ContentClient } from '../src/index.js';
const env = {}; // Your env variables to connect to spacecat apis and google drive
const onedriveclient = await ContentClient.createFromDomain('example.com', env, log);
const results = await client.getPageMetadata('/path1');
console.log(results);
Microsoft Sharepoint Drive
import { ContentClient } from '../src/index.js';
const context = {}; // Your env variables to connect to spacecat apis and onedrive
const onedriveclient = await ContentClient.createFrom(context, { url: 'ONEDRIVE_URL', type: 'onedrive' });
const results = await client.getPageMetadata('/path1');
console.log(results);
import { ContentClient } from '../src/index.js';
const env = {}; // Your AWS Lambda context object
const onedriveclient = await ContentClient.createFromDomain('example.com', env, log);
const results = await client.getPageMetadata('/path1');
console.log(results);
Additional Information
- Repository: GitHub
- Issue Tracking: GitHub Issues
- License: Apache-2.0