Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get all GitHub Gists of a user
async function getGithubGists() {
const githubUsername = 'octocat'
const gists = await fetch(
const gistsJson = await gists.json()
const snippets = [] => {
title: gist.files[Object.keys(gist.files)[0]].filename,
description: gist.description,
code: gist.html_url
return snippets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment