playfab
v1.0.1
Published
JS playfab SDK
Downloads
118
Readme
Playfab post actions
This library will be useful for send actions and events to Playfab.
Installation
You must have Node 20 LTS installed
Run
npm install --save
cp .env.example .env
On .env
do you need to set you Playfab credentials:
PLAYFAB_EVENT_NAME=action
PLAYFAB_TITLE_ID=
PLAYFAB_SECRET_KEY=
Usage
const {PlayFabSDK} = require('playfab');
playFabClient = new PlayFabSDK('playfabCustomId');
// wait 3 seconds to login
setTimeout(() => {
playFabClient.postAction({
questId: 2826126,
userId: 3000,
type: "deslocamento",
coords: [1,2,3],
time: Date.now(),
});
}, 3000);