@adobe/aio-lib-audience-manager-cd

2.1.0 • Public • Published

This repository is deprecated and is no longer maintained.


Version Downloads/week Node.js CI License Codecov Coverage

Adobe I/O Audience Manager Customer Data SDK

Node Javascript SDK wrapping the Audience Manager Customer Data API.

More details on the API can be found here.

Installing

$ npm install

Usage

  1. Initialize the SDK
const sdk = require('@adobe/aio-lib-audience-manager-cd')

async function sdkTest() {
  //initialize sdk
  const client = await sdk.init('<orgId>', 'x-api-key', '<valid auth token>')
}
  1. Call methods using the initialized SDK
const sdk = require('@adobe/aio-lib-audience-manager-cd')

async function sdkTest() {
  // initialize sdk
  const audienceManagerCDClient = await sdk.init('<orgId>', 'x-api-key', '<valid auth token>')

  // call methods
  try {
    // Get profiles
    const result = await client.audienceManagerCDClient.getProfile({})
    console.log(result)

  } catch (e) {
    console.error(e)
  }
}

All methods available under the SDK are documented here

Classes

AudienceManagerCDCoreApi

This class provides methods to call Adobe Audience Manager Customer Data APIs. Before calling any method initialize the instance by calling the init method on it with valid values for orgId, apiKey and accessToken.

Functions

init(orgId, apiKey, accessToken)Promise.<AudienceManagerCDCoreApi>

Returns a Promise that resolves with a new AudienceManagerCDCoreApi object.

AudienceManagerCDCoreApi

This class provides methods to call Adobe Audience Manager Customer Data APIs. Before calling any method initialize the instance by calling the init method on it with valid values for orgId, apiKey and accessToken.

Kind: global class

audienceManagerCDCoreApi.orgId : string

the organization id.

Kind: instance property of AudienceManagerCDCoreApi

audienceManagerCDCoreApi.apiKey : string

the API key for your integration.

Kind: instance property of AudienceManagerCDCoreApi

audienceManagerCDCoreApi.accessToken : string

the access token for your integration.

Kind: instance property of AudienceManagerCDCoreApi

audienceManagerCDCoreApi.init(orgId, apiKey, accessToken) ⇒ Promise.<AudienceManagerCDCoreApi>

Initializes a AudienceManagerCDCoreApi object and returns it.

Kind: instance method of AudienceManagerCDCoreApi
Returns: Promise.<AudienceManagerCDCoreApi> - AudienceManagerCDCoreApi object

Param Type Description
orgId string the organization id
apiKey string the API key for your integration
accessToken string the access token for your integration

audienceManagerCDCoreApi.updateStream(streamId, body)

Data streaming: Allows multiple profile updates on the same call.

Ingest profile updates related to a given data stream.

Kind: instance method of AudienceManagerCDCoreApi

Param Type Description
streamId string the streamID is an alphanumeric identifier.
body string the POST body.

audienceManagerCDCoreApi.updateProfile(dStreamId, [params], [body])

GET/POST a Data Collection: Update a single Audience Manager profile via a GET or POST request. If the body is left out the update is performed via a GET request using the params object. Otherwise, to enforce a POST request, please set the required parameters into the body object

Kind: instance method of AudienceManagerCDCoreApi

Param Type Default Description
dStreamId string the alphanumeric identifier for this stream.
[params] object {} optional request parameters.
[params.dSid] Array unique ID for a trait or a segment.
[params.dTDpid] Array data source for trait evaluation. Only traits from this data source are evaluated.
[params.dUuid] string unique Audience Manager user ID.
[params.dMid] string specifies the Experience Cloud ID set and used by the Experience Cloud ID service.
[params.dCid] string contains a pair of data provider ID and data provider user ID separated by %01.
[params.dWs] string write Style indicator: how the provided signals and/or trait IDs act upon the given profile(s).
[params.dLocationId] Array one or more location id that correspond to the region where we've previously seen this user interacting with the adobe services.
[body] object optional request parameters, use this instead of params to enforce a POST request.

audienceManagerCDCoreApi.getProfile(dataSourceId, id, [filter])

Get Audience Manager profile: Returns aggregated information for a profile from all Audience Manager regions, including trait and segment qualification information. You can filter the requests by region to return qualification information from certain regions only.

Kind: instance method of AudienceManagerCDCoreApi

Param Type Default Description
dataSourceId string the unique identifier of the Audience Manager data source that this identity is part of.
id string {integer} profile viewer id.
[filter] Array [] one or more location Ids, separated by comma, that correspond to the region(s) where profile information should be fetched from.

init(orgId, apiKey, accessToken) ⇒ Promise.<AudienceManagerCDCoreApi>

Returns a Promise that resolves with a new AudienceManagerCDCoreApi object.

Kind: global function
Returns: Promise.<AudienceManagerCDCoreApi> - a Promise with a AudienceManagerCDCoreApi object.

Param Type Description
orgId string the organization id.
apiKey string the API key for your integration.
accessToken string the access token for your integration.

Debug Logs

LOG_LEVEL=debug <your_call_here>

Prepend the LOG_LEVEL environment variable and debug value to the call that invokes your function, on the command line. This should output a lot of debug data for your SDK calls.

Contributing

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

Licensing

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

Readme

Keywords

none

Package Sidebar

Install

npm i @adobe/aio-lib-audience-manager-cd

Weekly Downloads

3,404

Version

2.1.0

License

Apache-2.0

Unpacked Size

85.8 kB

Total Files

9

Last publish

Collaborators

  • mhaack
  • amol-anand
  • doten
  • stopp-adobe
  • dylandepass
  • djaeggi
  • adobehalls
  • fullcolorcoder
  • marbec
  • tripod
  • garthdb
  • lazd
  • adobe-admin
  • patrickfulton
  • trieloff
  • shazron
  • krisnye
  • dcpfsdk
  • natebaldwin
  • devongovett
  • aspro83
  • symanovi
  • dpfister
  • stefan-guggisberg
  • korra
  • rofe
  • kptdobe