Numeric badge from external source in users profile

Create a user custom field. You can then push a value into it with the API.

But I think you want to do it in a plugin and pull the data with ruby, not javascript.