function showBadge(type, publicEntityId, elementId, format) {
fetch('https://reviews.rater8.com/webwidget/api/ratingsummary/' + type + '/' + publicEntityId + '?format=' +
format)
.then(function(response) {
response.text()
.then(function(snippet) {
document.getElementById(elementId).innerHTML = snippet;
})
})
}
showBadge('practice',
'52dcef54', 'rater8Badge', 'htmlrating')