Skip to content

Instantly share code, notes, and snippets.

@EdgarOrtegaRamirez
Created September 29, 2022 14:00
Show Gist options
  • Save EdgarOrtegaRamirez/1d956dc2dab2289f34d98f42829d355d to your computer and use it in GitHub Desktop.
Save EdgarOrtegaRamirez/1d956dc2dab2289f34d98f42829d355d to your computer and use it in GitHub Desktop.
Google API Deno Example
import { Content as ShoppingAPI, auth } from "https://googleapis.deno.dev/v1/content:v2.1.ts";
const merchantId = BigInt(124123123);
const serviceAccountConfig = await Deno.readTextFile("./service-account.json");
const credentials = auth.fromJSON(JSON.parse(serviceAccountConfig));
const shoppingAPI = new ShoppingAPI(credentials);
const response = await shoppingAPI.productsList(merchantId, {})
console.log(response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment