Imports Gists to Val Town

Import your TypeScript and JavaScript to Val Town

Authentication

This function requires two keys: one from Github to get your gists, and one from Val Town to make the vals in your account:

  1. Github token: https://github.com/settings/tokens
  2. Val Town key: https://www.val.town/settings/api

Usage

You can use this function by calling it and passing your keys like so:

@stevekrouse.importGists({
  githubToken: @me.secrets.githubGists,
  valTownKey: @me.secrets.valtown,
});

Example usage: https://www.val.town/v/stevekrouse.untitled_redAardvark

Credits

This val was almost entirely made by @maas. I just forked it and fixed a couple bugs.

Migrated from folder: Archive/importGists