1import { bitlyAPI } from "https://esm.town/v/galligan/bitlyAPI";
2
3export let bitlyShortenLink = async ({ long_url, token, domain, group_guid }) =>
4 bitlyAPI({
5 token,
6 endpoint: "shorten",
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);
1export const capitalize = (txt: string) => {
2 var sentences = txt.split(/[.!?]/);
3 for (var i = 0; i < sentences.length; i++) {
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events"
6);
35}> {
36 return fetchJSON(
37 "https://api.val.town/v1/me/comments?" +
38 searchParams({
39 relationship: relationship,
1// Get news from different sources I care about
2export let untitled4881419 = interface LeNews {
3 feedlyAPI: {
4 name: String,
5 desc: String,
8}
9
10export async function giveMeLeNews({ feedlyAPI }: LeNews) {
11 return "Works";
12}
3export async function dailyMathFact() {
4 let mathFact = await fetchText(
5 "http://numbersapi.com/random/math",
6 );
7 return { data: mathFact };
1export function myApi() {
2 return { something: "is happening" };
3}
1export function myApi(name) {
2 return "hi " + name;
3}
3export let get_weather = async function () {
4 let response = await fetch(
5 "https://api.open-meteo.com/v1/forecast?latitude=49.26&longitude=-123.07¤t_weather=true"
6 );
7 return response.ok;