1# [Val Town Typescript Spec](https://pomdtr-valtownOpenAPI.web.val.run)
2
3This val return an up-to-date typescript version of the val.town openapi spec for usage with a [feTS](https://github.com/ardatan/feTS) client.
4
5## Usage
9```typecript
10import { createClient, type NormalizeOAS } from "npm:fets";
11import openapi from "https://pomdtr-valtownOpenAPI.web.val.run/openapi.ts";
12
13export const client = createClient<NormalizeOAS<typeof openapi>>({
14 endpoint: openapi.servers[0].url,
15});
16```
1Migrated from folder: Archive/newValTownOpenAPI
1Migrated from folder: A_Make_A_Val_Day/_23_07_27_Generate_Val/generateValCodeAPI
1# Use GPT to generate vals on your account!
2
3Describe the val that you need, call this function, and you'll get a new val on your workspace generated by OpenAI's API!
4
5First, ensure you have a [Val Town API Token](https://www.val.town/settings/api), then call `@andreterron.createGeneratedVal({...})` like this [example](https://www.val.town/v/andreterron.untitled_tomatoKiwi):
6
7```javascript
1# Are.na API
2
3Example of using the [are.na](https://dev.are.na/documentation/channels#Block43472) API to get the contents of an Are.na board - specifically my fun board that showcases websites with that "glossy black style."
4
5All you need is [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to make this happen!
6
7Migrated from folder: API_Examples/arenaApiExample
1# ky
2
3The [ky module](https://www.npmjs.com/package/ky) is a nice abstraction around the [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), which is easily compatible with Deno. It's by the same creator as [got](https://npmjs.com/got), which more explicitly targets Node.js.
4
5Most of the time, the `fetch` method is all you need! But in a pinch, you can use `ky` to make things a little fancier.
1# Val Town API: unauthenticated eval
2
3This val runs a val by using the [Val Town API](https://docs.val.town/api/reference) and returns the result of its evaluation.
4
5Migrated from folder: Val_Town_API/evaluationFromValExample
1# Val Town API: Find a val by handle and name
2
3This val fetches itself via the [Val Town API](https://docs.val.town/api/reference)! Weird, right?
4
5Migrated from folder: Val_Town_API/valTownApiExampleVal
1# Val Town API: Find a user by their handle
2
3This demonstrates how to use the [Val Town API](https://docs.val.town/api/reference) to find a user.
4
5Migrated from folder: Val_Town_API/valTownApiExampleUser
1# Val Town API Search
2
3This demonstrates how to use the [Val Town API](https://docs.val.town/api/reference) to search for vals that mention "lodash".
4
5Migrated from folder: Val_Town_API/valTownApiExampleSearch