How to extract data in a plugin

Hi!
I am trying to undestand how to develop a plugin. I followed both parts of the tutorial of this webpage https://grafana.com/blog/2016/04/08/timing-is-everything.-writing-the-clock-panel-plugin-for-grafana-3.0/ with success.

Now I am trying to visualize one value stored in influxDB. How can I do it? I am trying to make a plugin similar to Singlestat, but more simple in order to understand how the connection between influxdb and Grafana works.

Thanks!