Git Product home page Git Product logo

aio-lib-launch's Introduction

Version Downloads/week Build Status License Codecov Coverage

Adobe I/O - Adobe Experience Launch API Lib

Installing

$ npm install @adobe/aio-lib-launch

Usage

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

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

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

  // call methods
  try {
    // get... something
    const result = await client.getEnvironment('my-environment-id')
    console.log(result)

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

Classes

ExperienceLaunchAPI

This class provides methods to call your ExperienceLaunchAPI APIs. Before calling any method initialize the instance by calling the init method on it with valid values for imsOrgId, apiKey and accessToken

Functions

init(imsOrgId, apiKey, accessToken) โ‡’ Promise.<ExperienceLaunchAPI>

Returns a Promise that resolves with a new ExperienceLaunchAPI object.

Typedefs

MyParameters : object

An example of a typed object.

AnotherThing : object

Another typed object.

ExperienceLaunchAPI

This class provides methods to call your ExperienceLaunchAPI APIs. Before calling any method initialize the instance by calling the init method on it with valid values for imsOrgId, apiKey and accessToken

Kind: global class

experienceLaunchAPI.imsOrgId : string

The IMS Org Id

Kind: instance property of ExperienceLaunchAPI

experienceLaunchAPI.apiKey : string

The api key from your integration

Kind: instance property of ExperienceLaunchAPI

experienceLaunchAPI.accessToken : string

The access token from your integration

Kind: instance property of ExperienceLaunchAPI

experienceLaunchAPI.init(imsOrgId, apiKey, accessToken) โ‡’ Promise.<ExperienceLaunchAPI>

Initializes a ExperienceLaunchAPI object and returns it.

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

Param Type Description
imsOrgId string the IMS Org Id
apiKey string the API key for your integration
accessToken string the access token for your integration

experienceLaunchAPI.getEnvironment(id) โ‡’ Promise.<Response>

Get an Environment by Id.

Kind: instance method of ExperienceLaunchAPI
Returns: Promise.<Response> - the response

Param Type Description
id string the environment id

init(imsOrgId, apiKey, accessToken) โ‡’ Promise.<ExperienceLaunchAPI>

Returns a Promise that resolves with a new ExperienceLaunchAPI object.

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

Param Type Description
imsOrgId string the IMS Org Id
apiKey string the API key for your integration
accessToken string the access token for your integration

MyParameters : object

An example of a typed object.

Kind: global typedef
Properties

Name Type Description
optionA string some option
optionB string another option

AnotherThing : object

Another typed object.

Kind: global typedef
Properties

Name Type Description
mayBeSomething boolean an option

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.

aio-lib-launch's People

Contributors

greenkeeper[bot] avatar janexner avatar moritzraho avatar sandeep-paliwal avatar shazron avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.