@adobe/asset-compute-events-client

    1.0.1 • Public • Published

    Adobe Asset Compute I/O Events Javascript Client

    Version

    This is an internal library of the Adobe Asset Compute SDK. A simple Javascript/NodeJS client for using Adobe I/O Events.

    Installation

    npm install @adobe/asset-compute-events-client
    

    Usage

    Sending an event

    const { AdobeIOEvents } = require('@adobe/asset-compute-events-client');
     
    // setup using necessary credentials
    const ioEvents = new AdobeIOEvents({
        // access token from an integration/technical account with I/O Events entitlement
        accessToken: "ey...",
        // organization sending/receiving events
        orgId: "6EEF12345678901234567890@AdobeOrg",
     
        defaults: {
            providerId: "my_event_provider_id"
        }
    });
     
    // send an event
    return ioEvents.sendEvent({
        code: "my_event_type",
        payload: {
            hello: "world",
            date: new Date()
        }
    });
     

    Receiving events

    const { AdobeIOEvents, AdobeIOEventEmitter } = require('@adobe/asset-compute-events-client');
     
    // setup using necessary credentials
    const ioEvents = new AdobeIOEvents({
        // access token from an integration/technical account with I/O Events entitlement
        accessToken: "access...",
    });
     
    // receiving events
    const ioEventEmitter = new AdobeIOEventEmitter(ioEvents, 'http://journal-url');
    ioEventEmitter.on('event', (event) => {
        // handle event
    })
    ioEventEmitter.on('error', (error) => {
        // report error
    })

    Contributing

    Contributions are welcomed! Read the Contributing Guide for more information.

    Licensing

    This project is licensed under the Apache V2 License. See LICENSE for more information.

    Keywords

    none

    Install

    npm i @adobe/asset-compute-events-client

    DownloadsWeekly Downloads

    719

    Version

    1.0.1

    License

    Apache-2.0

    Unpacked Size

    47.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • patrickfulton
    • marbec
    • tripod
    • garthdb
    • lazd
    • adobe-admin
    • trieloff
    • krisnye
    • dcpfsdk
    • natebaldwin
    • devongovett
    • aspro83
    • symanovi
    • dpfister
    • stefan-guggisberg
    • korra
    • rofe
    • kptdobe