$150 in ICP bounty: get me a json file out of hosted candid UI via google appscript

I need a script written for a google apps script environment that will go to https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=vq3jg-tiaaa-aaaao-ag2uq-cai

query a number for “getneurons”, take the result turn it into JSON parser readable.

you should work off this pre-existing code which currently doesn’t work because axon.ooo isn’t available anymore:

> /**
>  * Query the API endpoint and return the response of the request.
>  * @returns {Object} The JSON object with the response of the request.
>  */
> function fetchAxonAPIData() {
>   // Get URL from settings
>   const axonAPIEndpointURL =
>     PropertiesService.getDocumentProperties().getProperty(
>       'AXON_API_ENDPOINT_URL'
>     ) || defaultSettings.axonAPIEndpointURL;
> 
>   // Retrieve data with HTTP request using exponential backoff
>   return call(function () {
>     var options = { 'validateHttpsCertificates' : false };
>     const response = UrlFetchApp.fetch(axonAPIEndpointURL, options);
>     return JSON.parse(response.getContentText());
>   }, console.warn);
> }

hopefully this is a 5 minute quick cash job for someone

1 Like