Publishing my old note, of how to use Google Analytics Core Reporting API (v2)