How to use the @alfresco/js-api.AlfrescoApi function in @alfresco/js-api

To help you get started, we’ve selected a few @alfresco/js-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Alfresco / alfresco-js-api / test / integration / test-node / login-ecm.ts View on Github external
async function main() {

    program
        .version('0.1.0')
        .option('--host  [type]', '')
        .option('-p, --password [type]', 'password ')
        .option('-u, --username [type]', 'username ')
        .parse(process.argv);

    let alfrescoApi: AlfrescoApi = new AlfrescoApi();

    alfrescoApi.setConfig({
        provider: 'ECM',
        hostEcm: program.host,
        authType: 'BASIC',
        contextRoot: ''
    });

    alfrescoApi.login(program.username, program.password).then(() => {
        let discovery = new DiscoveryApi(alfrescoApi);
        discovery.getRepositoryInformation().then(
            (ecmVers) => {
                console.log('ecmVers' + JSON.stringify(ecmVers));
            },
            () => {
                process.exit(1);
github Alfresco / alfresco-js-api / test / performance / test-webpack / index.ts View on Github external
constructor() {
        let alfrescoApi = new AlfrescoApi();
        alfrescoApi.setConfig({
            provider: 'ECM',
            hostEcm: 'http://localhost:3000',
            authType: 'BASIC',
            contextRoot: ''
        });

        let discovery = new DiscoveryApi(alfrescoApi);
        discovery.getRepositoryInformation().then(
            (ecmVers) => {
                console.log('ecmVers' + ecmVers);
            },
            (ecmVers) => {
                console.log('error ecmvers' + ecmVers);
            });
    }
github Activiti / activiti-modeling-app / projects / ama-testing / src / e2e / api / acm / acm-backend.ts View on Github external
constructor(public config: TestConfig) {
        this.api = new AlfrescoApi({
            provider: 'BPMN',
            authType: config.ama.backendConfig.authType,
            oauth2: config.ama.backendConfig.oauth2
        });
    }