Created
September 29, 2022 14:00
-
-
Save EdgarOrtegaRamirez/1d956dc2dab2289f34d98f42829d355d to your computer and use it in GitHub Desktop.
Google API Deno Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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