npm install fullstoryOfficial home on NPM: https://www.npmjs.com/package/fullstory
Official home on Github: https://github.com/eenewbsauce/fullstory
npm i fullstory
2. Add environment variable for authentication (optional)
export FULLSTORY_TOKEN={YOUR_TOKEN}
or set in .bashrc, .bash_profile, etc...
3. Require the library
let fullStory = require('fullstory');
4. Query the FullStory API
- All parameters shown in [ ] are optional
- If uid and email supplied, then API with return union of the two collections
As Callback
``javascript
let fsParams = {
uid: number,
email: string
limit: number
}
fullStory.getSessions(fsParams[,token][,(err, sessions) => {
console.log(sessions) // [{UserId:123, SessionId: 456, CreatedTime: 1476470464, FsUrl: https://www.fullstory.com...}]
}])
`
As Promise
`javascript`
fullStory.getSessions(fsParams[,token])
.then(sessions => {
let sessions = sessions;
})
.catch(err => {
//handle err
})
Fetch sessions for a client by uid
npm run test-e2e {your_client_uid}
Fetch sessions for a client by email
npm run test-e2e {your_client_email}
Fetch union of sessions for a client with uid and email
npm run test-e2e {your_client_uid} {your_client_email}
npm test`