# aio-lib-magento **Repository Path**: mirrors_adobe/aio-lib-magento ## Basic Information - **Project Name**: aio-lib-magento - **Description**: Work In Progress 🚧 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![Version](https://img.shields.io/npm/v/@adobe/aio-lib-magento.svg)](https://npmjs.org/package/@adobe/aio-lib-magento) [![Downloads/week](https://img.shields.io/npm/dw/@adobe/aio-lib-magento.svg)](https://npmjs.org/package/@adobe/aio-lib-magento) [![Build Status](https://travis-ci.com/adobe/aio-lib-magento.svg?branch=master)](https://travis-ci.com/adobe/aio-lib-magento) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Codecov Coverage](https://img.shields.io/codecov/c/github/adobe/aio-lib-magento/master.svg?style=flat-square)](https://codecov.io/gh/adobe/aio-lib-magento/) # Adobe Magento Lib ### Installing ```bash $ npm install @adobe/aio-lib-magento ``` ### Usage 1) Initialize the SDK ```javascript const sdk = require('@adobe/aio-lib-magento') async function sdkTest() { //initialize sdk const client = await sdk.init('', 'x-api-key', '') } ``` 2) Call methods using the initialized SDK ```javascript const sdk = require('@adobe/aio-lib-magento') async function sdkTest() { // initialize sdk const client = await sdk.init('', 'x-api-key', '') // call methods try { // get profiles by custom filters const result = await client.getSomething({}) console.log(result) } catch (e) { console.error(e) } } ``` ## Classes
MagentoCoreAPI

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

## Functions
init(tenantId, apiKey, accessToken) ⇒ Promise.<MagentoCoreAPI>

Returns a Promise that resolves with a new MagentoCoreAPI object.

## Typedefs
MyParameters : object

An example of a typed object.

AnotherThing : object

Another typed object.

## MagentoCoreAPI This class provides methods to call your MagentoCoreAPI APIs. Before calling any method initialize the instance by calling the `init` method on it with valid values for tenantId, apiKey and accessToken **Kind**: global class * [MagentoCoreAPI](#MagentoCoreAPI) * [.tenantId](#MagentoCoreAPI+tenantId) : string * [.apiKey](#MagentoCoreAPI+apiKey) : string * [.accessToken](#MagentoCoreAPI+accessToken) : string * [.init(tenantId, apiKey, accessToken)](#MagentoCoreAPI+init) ⇒ [Promise.<MagentoCoreAPI>](#MagentoCoreAPI) * [.getSomething([parameters])](#MagentoCoreAPI+getSomething) ⇒ Promise.<Response> ### magentoCoreAPI.tenantId : string The tenant id **Kind**: instance property of [MagentoCoreAPI](#MagentoCoreAPI) ### magentoCoreAPI.apiKey : string The api key from your integration **Kind**: instance property of [MagentoCoreAPI](#MagentoCoreAPI) ### magentoCoreAPI.accessToken : string The access token from your integration **Kind**: instance property of [MagentoCoreAPI](#MagentoCoreAPI) ### magentoCoreAPI.init(tenantId, apiKey, accessToken) ⇒ [Promise.<MagentoCoreAPI>](#MagentoCoreAPI) Initializes a MagentoCoreAPI object and returns it. **Kind**: instance method of [MagentoCoreAPI](#MagentoCoreAPI) **Returns**: [Promise.<MagentoCoreAPI>](#MagentoCoreAPI) - a MagentoCoreAPI object | Param | Type | Description | | --- | --- | --- | | tenantId | string | the tenant id | | apiKey | string | the API key for your integration | | accessToken | string | the access token for your integration | ### magentoCoreAPI.getSomething([parameters]) ⇒ Promise.<Response> Get something. **Kind**: instance method of [MagentoCoreAPI](#MagentoCoreAPI) **Returns**: Promise.<Response> - the response | Param | Type | Default | Description | | --- | --- | --- | --- | | [parameters] | [MyParameters](#MyParameters) | {} | parameters to pass | ## init(tenantId, apiKey, accessToken) ⇒ [Promise.<MagentoCoreAPI>](#MagentoCoreAPI) Returns a Promise that resolves with a new MagentoCoreAPI object. **Kind**: global function **Returns**: [Promise.<MagentoCoreAPI>](#MagentoCoreAPI) - a Promise with a MagentoCoreAPI object | Param | Type | Description | | --- | --- | --- | | tenantId | string | the tenant 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 ```bash LOG_LEVEL=debug ``` 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](./.github/CONTRIBUTING.md) for more information. ### Licensing This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.