Created
January 6, 2022 14:32
-
-
Save hmelenok/53f98d6396f182efdf24d6b788e0afb2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Now | |
*/ | |
import Api from './api'; | |
import {ContentApi} from './index'; | |
Api.API_HOST = 'x'; | |
Api.AUTH_TOKEN = 'y'; | |
ContentApi.getGem(''); | |
/** | |
* What we need? | |
*/ | |
import SDK from '../sdk'; | |
const sdkStaging = new SDK({token: 'some-token', dtXApiKey: 'xxx', cpwApiKey: 'xxx'}); | |
const sdkProdEU = new SDK({token: 'some-token', dtXApiKey: 'xxx', cpwApiKey: 'xxx'}); | |
const sdkProdUS = new SDK({token: 'some-token', dtXApiKey: 'xxx', cpwApiKey: 'xxx'}); | |
sdkStaging.getInstance((i, params) => { | |
const callMe = ContentApi.getGem.bind(i); | |
return callMe(params); | |
}); | |
sdkProdEU.getGem(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment