I'm trying to connect to an existing API socket-io websocket offered through an API I'm using. Their docs say in JS to listen like this
// Listen for trip:finished event
socket.on('trip:finished', function(eventJSON) {
console.log('Trip Finished', eventJSON);
});
// Handle error messages
socket.on('error', function(errorMessage) {
console.log('Error', errorMessage);
});
How can I specify I want to list to trip:finished using this solution?