Google Calendar

Hi! I am looking for a minimal example how to access google calendar API. I already obtained credentials.json form Google, just would like to have a minimal "hello world" of Google calendars. Like list all of my calendars. I am stuck at this point: how to assemble a CredentialsClient? https://doc.deno.land/https://googleapis.deno.dev/v1/calendar:v3.ts/~/CredentialsClient ps: is this a good place to ask it? I cannot find a good relevant label, which signals maybe I'm not at the right place…
googleapis.deno.dev/v1/calendar:v3.ts – CredentialsClient | Deno Doc
Defines the root interface for all clients that generate credentials for calling Google APIs. All clients should implement this interface.
DAHDeno AI Helper12/12/2023
Hello! I've checked the official Deno documentation and couldn't find a specific example for accessing the Google Calendar API using Deno. However, I can provide some general guidance based on the information you've provided in your message. Firstly, it's important to note that my advice is not based on the Deno documentation, so please double-check the accuracy of the advice given. From what you've described, it sounds like you're trying to create a CredentialsClient to interact with the Google Calendar API. Typically, to access Google APIs, you would need to use OAuth 2.0 for authorization. The process usually involves creating an OAuth client, obtaining an access token, and then using that token to make authenticated requests to the API. Here's a very high-level and generic example of steps you might follow, but please note that this is not a Deno-specific example and you should refer to the appropriate libraries and documentation for Deno: 1. Load your credentials.json file to retrieve your client ID and client secret. 2. Use these credentials to create an OAuth client. 3. Generate an authorization URL and navigate to it to obtain an authorization code. 4. Exchange the authorization code for an access token. 5. Use the access token to make requests to the Google Calendar API. Since you mentioned a CredentialsClient, it seems like you might be referring to a specific library or module for Deno that I'm not aware of. If this is a third-party module, I would recommend looking at the module's documentation or repository for examples or further instructions. As for whether this is a good place to ask, you're welcome to ask Deno-related questions here, and we'll do our best to assist you. If your question is about a third-party library, you might also
DAHDeno AI Helper12/12/2023
consider reaching out to the maintainers of that library or looking for a community specific to that library. Remember to always handle your credentials securely and never expose them in your code or to unauthorized parties.
Hi @pihentagy — I ended up getting this working by hand rolling my own GoogleClient that makes fetch requests. Wading through all the docs was challenging! Perhaps the library you referenced works, but I haven't tested it. If the credentials.json object includes your access_token & refresh_token, this should work as it's working for me.
Nice!! Can you provide the types.ts file too?
@cdoremus here you are!
ABAltair 680b12/18/2023
Do I see a possible blog post there?
Possibly once I finish my current post

Looking for more? Join the community!

Recommended Posts
I can't access my deno cloud github accountPlease help, by mistake I converted my personal github account to an organization account, and now IUploaded a module, need help!I uploaded my module: https://deno.land/x/vipps_mobilepay_sdk@0.0.1 But then I realised that I shoulBetter way of finding element from mapIm making an api and all routes are stored in a map. is there a better and more optimised way to loodeno info depthhow do i limit maximum output depth for `deno info` command? for example, it's easier to analyze verDate libraryCan anyone recommend a decent working date library for deno? All the ones I'm trying (datefns, dayjsawait writer.write(buffer) never resolves on Deno.CommandHiho. I'm creating a `Deno.Command` that writes a buffer to `vipsthumbnail` via stdin (and reads theNot sure if I understand kv watch right?Not sure if I understand kv watch right, is like named queues? o more like a reliable Broadcast chanDisplaying a ModalI am trying to get a minimal example of using Bootstrap Modals, and managing that modal using state.How do I run an npm script with multiple dependencies, e.g. `drizzle-kit generate:pg`?I thought about wrapping it into a task `"generate": "deno run -A npm:drizzle-kit generate:pg"` in tHow to use a class name as a qualifier for an enum ?Hi there, it's more of a generic typescript question but I'm using it in the Deno context and the lihow can I make him see the process?```ts error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'on') proImporting NPM Packages in Deno Throws 'Uncaught SyntaxError' for Specific ModulesHi there, I'm relatively new to Deno. I'm running into an error with an NPM package import. ```JS imHow to override type definitions provided by a third party module@Deno AI Helper How do I override type definitions provided by a third party moduleSync Child Stdin ReadI'd like to make a JS wrapper around the repl of another language. For example: ```js let a = otherUsing custom font using fresh and tailwindcssHello ! I recently followed [this guide](https://fresh.deno.dev/docs/examples/migrating-to-tailwindwasm-vips file does not existOk this is not directly a deno thing, but anyway. Has anyone successfully used wasm-vips with `vips.