Skip to content

Instantly share code, notes, and snippets.

@nilleb
nilleb / README.md
Last active November 11, 2024 13:45
gdrive-openapi.yaml

Somebody has produced a openapi.yaml for Google Drive - Thank you!

And I had a spare application in my Google Cloud Console, so I told myself that I'd like to try to work with Google files directly from ChatGPT.

So I edited a but the file above, to match OpenAI ChatGPT's actions syntax, and here's the outcome.

@nilleb
nilleb / index.js
Created February 4, 2025 12:35
compare `qs.stringify` and `axios post with a dict` (using content-type `application/x-www-form-urlencoded`)
const axios = require('axios')
const qs = require('qs')
const url = 'https://httpbin.org/post'
const clientId = '9495d6bb-41c2-4c58-848f-92e52cf3d640'
const clientSecret = '9495d6bb-41c2-4c58-848f-92e52cf3d640'
async function stringify(resource) {
let params = {
grant_type: 'client_credentials',