trigger(eventName, data = null) {
        const onceTriggered = [];
        _.each(this.apiEvents, (event, i) => {
            const { evt, once, callback } = event;
            if (evt == eventName) {
                callback(data);
                if (once) {
                    onceTriggered.push(i);
                }
            }
        });
        if (onceTriggered.length) {
            _.each(onceTriggered, (i) => this.apiEvents.splice(i, 1));
        }
    }
Triggers an specific event
with data

@param string eventName