Thanks for your contribution, it adds a nice feature to the plugin.
Here are a few remarks to improve your future contributions:
There is a developer toolset page please read it and follow described guidelines (especially code formatting).
please create PRs from a repository clone and not from a fork: currently due to a Travis-CI (security) limitation, external (i.e. from a fork) PRs cannot be analyzed using SonarQube.
do not hesitate to contact me if you see that the plugin's code could be refactored to better suit your needs. Indeed, as you based your contribution on the code of existing WS, this ended up with code duplication, I could have (and will do it as a next step) refactored it in order to factorize code and minimise code duplication which would have in turn minimised your development effort.
We have developed a new web service to create a badge with the status of the last task of a project