npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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

v2.1.0

Published

Audience Manager Customer Data SDK

Downloads

8,293

Readme


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

Functions

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.