Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/...?q=api&page=26&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 19339 results for "api"(3083ms)

myApi1 file match

@ubuwaits•Updated 1 year ago

myApi1 file match

@justy•Updated 1 year ago

myApi1 file match

@joewalker•Updated 1 year ago

myApi1 file match

@rmkubik•Updated 1 year ago

myApi1 file match

@chuyeow•Updated 1 year ago

myApi1 file match

@deadlystudio•Updated 1 year ago

getYoutubeLinkFromPageAPI1 file match

@wilt•Updated 1 year ago

myApi1 file match

@benmanns•Updated 1 year ago

myApi1 file match

@ibrahim•Updated 1 year ago

myApi1 file match

@liyipoe•Updated 1 year ago

untitled-6069main.tsx6 matches

@masterpiece•Updated 28 mins ago
299 async function fetchData(endpoint) {
300 try {
301 const response = await fetch(`/Repository/docrepo/backend/api/${endpoint}.php`);
302 if (!response.ok) throw new Error('Network response was not ok');
303 return await response.json();
453 // Authentication functions
454 function checkAuthStatus() {
455 fetch('/Repository/docrepo/backend/api/auth/session.php')
456 .then(res => res.json())
457 .then(data => {
480 async function handleLogout() {
481 try {
482 const response = await fetch('/Repository/docrepo/backend/api/auth/logout.php', {
483 method: 'POST',
484 credentials: 'same-origin'
562
563 try {
564 const response = await fetch('/Repository/docrepo/backend/api/auth/login.php', {
565 method: 'POST',
566 headers: { 'Content-Type': 'application/json' },
591
592 try {
593 const response = await fetch('/Repository/docrepo/backend/api/auth/register.php', {
594 method: 'POST',
595 headers: { 'Content-Type': 'application/json' },
655
656 try {
657 const response = await fetch(`/Repository/docrepo/backend/api/${endpoint}.php`);
658
659 if (!response.ok) {

GlancerApp.tsx6 matches

@lightweight•Updated 50 mins ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useEffect, useState } from "https://esm.sh/react@18.2.0";
3import { DemoData, isApiError, isNotionPage } from "../index.tsx";
4import { GenerateHTML } from "./content/generateHTML.tsx";
5import { TOC } from "./content/demoTableOfContents.tsx";
56 if (!demoData) return <div>No demo data available</div>;
57
58 // Handle error responses from the API
59 if (isApiError(demoData)) {
60 return (
61 <div>
62 <h3>API Response:</h3>
63 <p>
64 <strong>Status:</strong> {demoData.status}
146 ? "active"
147 : ""
148 } capitalize`}
149 onClick={() => {
150 closeMenu();
225 }}
226 >
227 <h1 className="capitalize">
228 {page.properties.Name?.title?.[0]?.plain_text ||
229 "Untitled"}
apiry
snartapi