1.0.4 • Published 5 years ago

sdk-flags v1.0.4

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

SDK piccininno-sanes

###This SDK contains a function called getEvaluation() that requires the follow parameters: userId, flag_token.

First, we need a file that consumes this SDK. Let's call it, sdkConsumer.mjs ##Important: The next example uses the flag --experimental-modules to enable features for loading ESM modules. If you dont wish to install this flag, you have to change the line:

import { getEvaluation } from 'sdk-flags';

to:

const { getEvaluation } = require('sdk-flags');

Copy & paste this code into your file:

import { getEvaluation } from 'sdk-flags';

async function main() {
  const userId = 0; //here you put your userId number
  const flagId = '000000'; //here the flag's token you are looking to evaluate
  const response = await getEvaluation(userId, flagId);
  return response;
}
main();

##About the implementation: Link to Medium to learn about Modules

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago