Search
Code212
async function checkStargazers(repo: string) { console.log(`Fetching repo data for ${repo}`); const response = await fetch(`https://api.github.com/repos/${repo}`, { headers: { "Authorization": `Bearer ${Deno.env.get("GITHUB_TOKEN")}` } }); console.log(`Fetching stargazers page ${lastPage}`); const starResponse = await fetch( `https://api.github.com/repos/${repo}/stargazers?per_page=100&page=${lastPage}`, { headers: {
const response = await fetch( `https://api.github.com/repos/${owner}/${repo}/issues?page=${page}&per_page=${remainder}&state=all`, );
const response = await fetch( `https://api.github.com/repos/${owner}/${repo}/issues?page=${page}&per_page=${remainder}&state=all`, );
const response = await fetch( `https://api.github.com/repos/${owner}/${repo}/issues?page=${page}&per_page=${remainder}&state=all`, { headers: {
async function checkStargazers(repo: string) { console.log(`Fetching repo data for ${repo}`); const response = await fetch(`https://api.github.com/repos/${repo}`, { headers: { "Authorization": `Bearer ${Deno.env.get("GITHUB_TOKEN")}` } }); console.log(`Fetching stargazers page ${lastPage}`); const starResponse = await fetch( `https://api.github.com/repos/${repo}/stargazers?per_page=100&page=${lastPage}`, { headers: {
async function enrichIssues(owner: string, repo: string) { console.log(`Fetching issues for ${owner}/${repo}`); const response = await fetch(`https://api.github.com/repos/${owner}/${repo}/issues`); const issues = await response.json(); console.log(`Found ${issues.length} issues`);
export async function getGithubUsername(email: string) { const url = new URL("https://api.github.com/search/commits"); url.searchParams.set("q", `author-email:${email}`); url.searchParams.set("sort", "author-date");export async function getPopularGithubRepo(username: string, min_stars = 100) { const response = await fetch( `https://api.github.com/users/${username}/repos?sort=updated&per_page=100`, ); const repos = await response.json();
const response = await fetch( `https://api.github.com/repos/${repoOwner}/${repoName}/dispatches`, { method: "POST",
* Fetch function that can make requests to external APIs through Zapier's Relay service * * This function takes full URLs (like https://api.github.com/user) and transforms them * into the relay format (/relay/api.github.com/user) for the API client to route * to relay.zapier.com. *
const fetchFunction = Deno.env.get("GITHUB_TOKEN") ? fetch : proxiedFetch; const resp = await fetchFunction( `https://api.github.com/users/${username}/events/public?per_page=100`, { headers: {
Vals
No vals found
Users
No users found
titled “Move” Move import { blob } from "https://esm.town/v/std/blob"; await blob.move("myKey", "myKeyNew"); Lower-level API. Section titled “Lower-level API” We provide access to the lower-level getter and setters, which are useful
Get your API URL and service role key. Section titled “3. Get your API URL and service role key” Go to your project’s Settings via the sidebar. Inside API, scroll
to get your Browserbase API key and remix this val. Get your free Browserbase API key at https://www.browserbase.com/ Add it to your Val Town Environment Variables as BROWSERBASE_API_KEY. Remix this
require payment and API keys. If you need something free and you’re primarily interested in weather in the United States, you can check out the NOAA weather API. Also, OpenWeatherMap
questions about this page. Use OpenAI’s chat completion API with std/openai. This integration enables access to OpenAI’s language models without needing to acquire API keys. Val Town free users can
- Vals use the ES Module Syntax. Caveats: While we support Web Platform APIs, we also support many APIs that aren’t available in web browsers. Unlike web browsers, Deno can
page. Vals are the building blocks of Val Town. They can be used to create APIs, crons, websites, and email handlers with JavaScript. A val is a collaborative, versioned folder
this page. Deprecated. New vals should use the Web API instead, which supports a wider range of inputs & outputs. The Express API allows to run a Val as an
Open in ChatGPT Ask questions about this page. HTTP triggers let you serve a scalable API or website. They are built on the web-standard Request and Response objects, so are
that would be as easy to use as console.email and might work via Web Push API, in the meantime we recommend ntfy.sh as an easy way to send yourself push