You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: api.go
    path of file: ./repos/submarine/server/battle/lib/typhenapi/websocket/submarine
    
    the code of the file until where you have to start completion: // This file was generated by typhen-api

package submarine

import (
	"github.com/shiwano/submarine/server/bat
    
func New(session typhenapi.Session, serializer typhenapi.Serializer, errorHandler func(error)) *WebSocketAPI {
	api := &WebSocketAPI{}
	api.session = session
	api.serializer = serializer
	api.errorHandler = errorHandler
	api.Battle = _submarine_battle.New(session, serializer, errorHandler)
	return api
}