Implementation of badges in the javascript api

Change-Id: Ifad5a0c0d6d37426ab6a9bdb6b732756414ad950
Merge "Implementation of badges in the javascript api"