src/translator.js
function translateRole(role) {
    switch (role) {
        case "5615fa9ae596154a5c000000":
            return Types.UserRole.COOWNER;
        case "5615fd84e596150061000003":
            return Types.UserRole.MANAGER;
        case "52d1ce33c38a06510c000001":
            return Types.UserRole.MOD;
        case "5615fe1ee596154fc2000001":
            return Types.UserRole.VIP;
        case "5615feb8e596154fc2000002":
            return Types.UserRole.RESIDENT_DJ;
        case "564435423f6ba174d2000001":
            return Types.UserRole.DJ;
        default:
            return Types.UserRole.NONE;
    }
}
function translateRole(role) {
    switch (role) {
        case "5615fa9ae596154a5c000000":
            return Types.UserRole.COOWNER;
        case "5615fd84e596150061000003":
            return Types.UserRole.MANAGER;
        case "52d1ce33c38a06510c000001":
            return Types.UserRole.MOD;
        case "5615fe1ee596154fc2000001":
            return Types.UserRole.VIP;
        case "5615feb8e596154fc2000002":
            return Types.UserRole.RESIDENT_DJ;
        case "564435423f6ba174d2000001":
            return Types.UserRole.DJ;
        default:
            return Types.UserRole.NONE;
    }
}
function translateRole ( role ) { switch ( role ) { case "5615fa9ae596154a5c000000" : return Types . UserRole . COOWNER ; case "5615fd84e596150061000003" : return Types . UserRole . MANAGER ; case "52d1ce33c38a06510c000001" : return Types . UserRole . MOD ; case "5615fe1ee596154fc2000001" : return Types . UserRole . VIP ; case "5615feb8e596154fc2000002" : return Types . UserRole . RESIDENT_DJ ; case "564435423f6ba174d2000001" : return Types . UserRole . DJ ; default : return Types . UserRole . NONE ; } }
Translates the role integer returned by the dubtrack.fm API into an internal model.

@param {integer} roleAsInt - The dubtrack.fm API role
@returns {object} A corresponding object from the UserRole enum
Translates the role integer returned by the dubtrack . fm API into an internal model .