2
3export const nearestOpenStation = async ({ lon, lat }) => {
4 const gbfsDomain = "capitalbikeshare.com";
5 lon = +lon;
6 lat = +lat;
3
4export const alphaVantageSymbolSearch = async ({
5 apikey,
6 ...options
7}: {
8 apikey: string,
9 keywords: string,
10}) => {
11 const API_HOST = "alpha-vantage.p.rapidapi.com";
12 const queryString = await toQueryString({
13 ...options,
17 try {
18 const json = await fetchJSON(
19 `https://${API_HOST}/query?${queryString}`,
20 {
21 method: "GET",
22 headers: {
23 "X-RapidAPI-Key": apikey,
24 "X-RapidAPI-Host": API_HOST,
25 },
26 }
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
6 // "Bullet",
7 // "Computer",
8 // "Rapid",
9 // "Top Rated",
10 // "Blitz",
1import { myApi } from "https://esm.town/v/abdulamite/myApi";
2
3export let helloFriend = "Hello, " + myApi("abdulamite", "55");
1export function myApi(name) {
2 return "hi " + name;
3}
9 };
10};
11export const paginateAPI = async <T extends any = any>(
12 url: string,
13 options?: RequestInit,
4 async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();