Published
Edited
Feb 7, 2022
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
writeGist = {
SaveGist
return fetchGithub(
`/gists/${gistID}`, // path
{}, // prams
{ // options
headers:{},
method: "PATCH",
body: JSON.stringify({ files: { [GIST_FILENAME]: { content: JSON.stringify(characters) } }, }),
});
}
Insert cell
readGist = fetchGithub(`/gists/${gistID}`, {}) // not fully loaded due to 1MB limit
Insert cell
characters = JSON.parse(readGist.files[GIST_FILENAME].content)
Insert cell
Insert cell
gistID = 'be68483532aaf677b4e49bc57ce99cb5'
Insert cell
GIST_FILENAME = "notDND.json" // should I pull this name from the GISTS?
Insert cell
// readGist = fetchGithub(`/gists/${gistID}`, {}) // not fully loaded due to 1MB limit
Insert cell
readGist.files[GIST_FILENAME].truncated
Insert cell
readGist.files[GIST_FILENAME]
Insert cell
rtext = readGist.files[GIST_FILENAME].content // text
Insert cell
// characters = JSON.parse(readGist.files[GIST_FILENAME].content)
Insert cell
Insert cell
// writeGist = fetchGithub(
// `/gists/${gistID}`, // path
// {}, // prams
// { // options
// headers:{},
// method: "PATCH",
// body: JSON.stringify({
// files: {
// [GIST_FILENAME]: {
// content: JSON.stringify(foodPriceIndex),
// },
// },
// }),
// });
Insert cell
JSON.stringify(characters)
Insert cell
// For a notebook to access Secrets, it must statically reference one; this cell grants Secret access to the notebook from which we import the GitHub API helpers. `undefined &&` prevents the Secret from appearing in plaintext in the Inspector.
undefined && Secret("GITHUB_ACCESS_TOKEN")
Insert cell
rateLimitSummary
Insert cell
import {fetchGithub, hasApiKey, rateLimitSummary} from "@observablehq/github-actions-workflows-api"
Insert cell
import { table } from '@gnestor/table'
Insert cell
<style>

.katex-display,p,ul,h1,h2,h3,h4,li
{
font-family: sans-serif;
}

@media (hover: hover) {
.katex-display,p,ul,h1,h2,h3,h4,li {
max-width: 1100px;
min-width: $1100px; }
}
</style>
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more