5 try {
6 const soRes = await fetch(
7 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=pinata&site=stackoverflow`,
8 {
9 method: "GET",
24
25 const seRes = await fetch(
26 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=pinata&site=ethereum`,
27 {
28 method: "GET",
1export async function crux_add(name: string, content: string) {
2 const res = await fetch("https://crux.land/api/add", {
3 method: "POST",
4 headers: { "content-type": "application/json" },
14 const json = await res.json();
15 if (json.error) throw new Error(json.error);
16 return `https://crux.land/api/get/${json.id}`;
17}
6 const { default: axios } = await import("npm:axios");
7 const url =
8 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
9 try {
10 const response = await fetch(url, {
6 const { default: axios } = await import("npm:axios");
7 const url =
8 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
9 try {
10 const response = await fetch(url, {
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
7export async function getReplicatePrediction({
8 /** https://replicate.com/account */
9 apiKey,
10 predictionId,
11}: {
12 apiKey: string;
13 predictionId: string;
14}) {
15 if (!apiKey) {
16 throw new Error("missing apiKey; visit https://replicate.com/account");
17 } else if (!predictionId) {
18 throw new Error("missing predictionId");
19 }
20 const result = await fetchJSON(
21 `https://api.replicate.com/v1/predictions/${encodeURIComponent(predictionId)}`,
22 {
23 headers: {
24 Authorization: `Token ${apiKey}`,
25 },
26 },
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
1Migrated from folder: GPTs/memoryApiExample
1An API for mysubaru.com to enable remote start and stop.
2
3Requires env vars (val.town secrets) named: `SUBARU_USERNAME, SUBARU_PASSWORD, SUBARU_DEVICEID, SUBARU_VEHICLEKEY, SUBARU_PIN`. The username, password, and PIN should match your mysubaru.com credentials. The device ID and vehicle key can be found by inspecting the request body of a login network request at mysubaru.com.
1Returns a simple privacy policy for the GPT Memory API.
2
3Examples of input:
4- `apiName`: `Memory API`
5- `contactEmail`: `some@email.com`
6- `lastUpdated`: `2023-11-28`
7
8Migrated from folder: GPTs/memoryApiPolicy