Skip to content

Instantly share code, notes, and snippets.

@idream3
idream3 / WebsocketSample.js
Created March 8, 2020 23:06 — forked from flavioespinoza/WebsocketSample.js
Bittres Websocket Node.js Authentication Example
/**
* Node.js example
* https://github.com/Bittrex/beta
*
* By Flavio Espinoza
*
* Expanding on example from Adrian Soluch
*
* prerequisites:
* npm i signalr-client crypto lodash ololog
async getDocsForView(entryId, projectId, depth = 1) {
this.state.state.cursor('fetchingStatus').set(true);
let res = [];
const entry = await this.getDoc(entryId);
res.push(entry);
const parentId = R.last(entry.ancestors);
const childrenIds = R.concat(R.keys(entry.stepIds), R.keys(entry.postIds));
getInitialState() {
return {
rows: this.buildRows(0, 15),
isInfiniteLoading: false,
data: this.props.data
};
},
render() {
return (