Skip to content

Instantly share code, notes, and snippets.

@hmelenok
Created January 6, 2022 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmelenok/53f98d6396f182efdf24d6b788e0afb2 to your computer and use it in GitHub Desktop.
Save hmelenok/53f98d6396f182efdf24d6b788e0afb2 to your computer and use it in GitHub Desktop.
/**
* 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