Etc

Recipient of the Outstanding Google Developer Expert Award

I am thrilled and deeply honored to be recognized with the “First place in the Outstanding GDE award”. This incredible honor inspires me to redouble my efforts in advancing new projects and further energizing our amazing community.

Notifying New Release of Google APIs and Google Apps Script with Email using Google Apps Script

Gists

This is a sample script for notifying the new release of Google APIs and Google Apps Script with an email using Google Apps Script.

Recently, I published a sample script of “Retrieving Release Notes of Google Apps Script and Google APIs from RSS using Google Apps Script”. After this was published, I got an email that it wants to automatically notice the new release of Google APIs and Google Apps Script with an email. From this, I prepared a sample script as follows.

About Donation

From before, I have gotten several contacts about the donation to me. Thank you so much. So, today I could prepare the PayPal.Me. You can donate to me using the following URL.

https://paypal.me/tanaikech

google.script.run and jQuery.Deferred

google.script.run doesn’t return values. So I tried this using jQuery.Deferred.

GAS : Code.gs

function doGet() {
  return HtmlService.createHtmlOutputFromFile('index')
      .setSandboxMode(HtmlService.SandboxMode.IFRAME);
}

function getValues(e) {
  return e + "hoge";
}

HTML : index.html

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.js"></script>
<body>
  <input type="button" id="button" value="ok">
  <div id="result"></div>

  <script>
    $(() => {
      $("#button").click(() => {
        var str = "fuga";
        googleScriptRun(str).then((res) => {
          $('#result').text(res);
        });
      });
    });

    function googleScriptRun(str) {
      var d = new $.Deferred();
      google.script.run.withSuccessHandler((res) => {d.resolve(res)}).getValues(str);
      return d.promise();
    }
  </script>
</body>

Result :

fugahoge

Above sample can be also written as follows.

Netatmo API Had Been Down 2

Report

Netatmo API had been down from Aug. 8, 2017 21:30 JST to Aug. 9, 2017 17:30 JST. Now it’s working.

I got an e-mail from Netatmo. They say that the issue was solved.

CoffeeScript

I may be slow a bit, but I could notice much convenience of CoffeeScript just now. I didn’t know that scripts of GAS can be made by CoffeeScript up until now. This will have me work more effectively! :D

1stpost

This is a first post. Today this blog was launched. I would like to introduce some of my experimental results. I’m Japanese. So I’ll use both English and Japanese here. Thank you.