Skip to content

Superface.ai traffic junction problem #9

Answered by freaz
rydlobeton asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, from the samples you sent, it looks like you are not passing the provider option correctly. It needs to be set to provider property. Like this:

const provider1 = await sdk.getProvider('provider1');
const provider2 = await sdk.getProvider('provider2');
const provider3 = await sdk.getProvider('provider3');

const profile = await sdk.getProfile('example');
const profile2 = await sdk.getProfile('example2');

const res1 = await profile.getUseCase('example').perform({ data }, { provider: provider3 });
const res2 = await profile2.getUseCase('example2').perform({ data }, { provider: provider2 });

Or there is a shorter way, by passing provider name as a string:

const profile = await sdk.get…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@freaz
Comment options

Answer selected by martyndavies
@rydlobeton
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants