Agent Code for "Analog Input (Potentiometer)" Tutorial

Hello everyone! I am new to electric imp and was going through tutorials when I started to wonder that what would be the agent code for the following example tutorial.

https://electricimp.com/docs/examples/analogin-pot/

Thanks

why do you want agent code for this??
However, you can pass pot-values to the agent.
https://electricimp.com/docs/api/agent/send/

My initial post was “http://forums.electricimp.com/discussion/2574/google-script-web-app-ajax-jquery-json

Since no one was able to help me with it, I started to explore another way of asking the imp for the potentiometer value and post it on the web app using google script. Is it possible I can grab the potentiometer val by asking a url using javascript?

well, this is really a javascript question, but from the imp-side it is possible.
https://electricimp.com/docs/api/httprequest/