Skip to content

Latest commit

 

History

History

node

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Event Farm Logo
Official Event Farm Node.js SDK Example

Usage

Please see ./src/main.ts

require('dotenv').config();

import { BackEndClient } from '@eventfarm/javascript-sdk/dist/BackEndClient';
import { ClientAccessToken } from '@eventfarm/javascript-sdk/dist/Rest/Client/ClientAccessToken';


const client = new BackEndClient(
  process.env.CLIENT_ID,
  process.env.CLIENT_SECRET,
  process.env.EMAIL,
  process.env.PASSWORD,
  process.env.AUTH_DOMAIN,
  process.env.API_DOMAIN,
);

client.useCaseFactory
  .Feature()
  .ListFeatures()
  .then((apiResponse: any) => {
    console.log(apiResponse.data);
  })
  .catch(err => {
    console.log(err.response.data);
  });