marax_server_sdk

0.1.1 • Public • Published

marax_server_sdk

Marax Server SDK to send transactional events from client server to marax server

  • API version: 0.1.1
  • Package version: 0.1.1

Getting Started

let MaraxServerSdk = require('marax_server_sdk');

let defaultClient = MaraxServerSdk.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
let maraxId = "id-obtained-from-jwt-payload";
let client = "client-identifier-here";

let api = new MaraxServerSdk.AdminApi()
let opts = {
  'requestBody': new MaraxServerSdk.RequestBody(maraxId, client) // {RequestBody} Details of transactional event
};
api.eventProcessPost(opts)
   .then( data => {
      console.log('API called successfully. Returned data: ' + data);
   }
  .catch( error => {
      console.error(error);
  });

Documentation for API Endpoints

All URIs are relative to https://<client-name>.marax.ai

Class Method HTTP request Description
MaraxServerSdk.AdminApi processEvent POST /event/process Perform reward post-processing

Documentation for Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

Package Sidebar

Install

npm i marax_server_sdk

Weekly Downloads

1

Version

0.1.1

License

Apache-2.0

Unpacked Size

74.5 kB

Total Files

16

Last publish

Collaborators

  • nagarjun-marax