src/net/userMetadataUrlHelperMixin.js
/**
	 * Generate a URL for viewing the configured user's metadata via a <code>GET</code> request.
	 *
	 * @param {number|number[]|null} [userId] a specific user ID (or set of IDs);
     *                                        if not provided the <code>userIds</code> property of this class will be used;
     *                                        if <code>null</code> then get the metadata for the requesting user
	 * @returns {string} the URL
	 */
Generate a URL for viewing the configured user's metadata via a GET request.
@param {number|number[]|null} [userId] a specific user ID (or set of IDs);
if not provided the userIds property of this class will be used;
if null then get the metadata for the requesting user
@returns {string} the URL
Generate a URL for viewing the configured user ' s metadata via a GET request . @param { number|number [] |null } [ userId ] a specific user ID ( or set of IDs ) ; if not provided the userIds property of this class will be used ; if null then get the metadata for the requesting user @returns { string } the URL
viewUserMetadataUrl(userId) {
        let result = this.baseUrl() +'/users/meta';
        let userIds = (userId || this.userIds);
        if ( userIds && userId !== null ) {
            if ( Array.isArray(userIds) ) {
                if ( userIds.length > 1 ) {
                    result += '?userIds=' +userIds.join(',');
                } else {
                    result += '?userId=' +userIds[0];
                }
            } else {
                result += '?userId=' +userIds;
            }
        }
        return result;
    }
viewUserMetadataUrl ( userId ) { let result = this . baseUrl ( ) + '/users/meta' ; let userIds = ( userId || this . userIds ) ; if ( userIds && userId !== null ) { if ( Array . isArray ( userIds ) ) { if ( userIds . length > 1 ) { result += '?userIds=' + userIds . join ( ',' ) ; } else { result += '?userId=' + userIds [ 0 ] ; } } else { result += '?userId=' + userIds ; } } return result ; }
Generate a URL for viewing the configured user's metadata via a <code>GET</code> request.
Generate a URL for viewing the configured user ' s metadata via a <code > GET< / code > request .