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/image-url.jpg%20%22Optional%20title%22?q=api&page=123&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 13702 results for "api"(736ms)

correctREADME.md10 matches

@Funfulgenceโ€ขUpdated 4 days ago
1# Jobrapido Backend
2
3This is the Django backend for the Jobrapido application. It provides API endpoints for user authentication, profile management, and other features.
4
5## Project Structure
6
7- `api/` - Main Django app containing models, views, and API endpoints
8- `jobrapido/` - Django project settings
9- `templates/` - Django templates for non-admin users
10
37 ```
38
39## API Endpoints
40
41- `/api/register/` - User registration
42- `/api/login/` - User login
43- `/api/send-verification-code/` - Send email verification code
44- `/api/profile/` - Get or update user profile
45- `/api/forgot-password/` - Request password reset
react-router-hono-starter

react-router-hono-starterserver.tsx2 matches

@jxnblkโ€ขUpdated 4 days ago
14const app = new Hono();
15
16// api server
17app.get("/api", async (c) => {
18 return c.json([
19 { name: "Leia", breed: "DSH", coat: "Calico" },

TOStypes.ts2 matches

@Zoemediaโ€ขUpdated 4 days ago
90}
91
92// API response types
93export interface ApiResponse<T> {
94 success: boolean;
95 data?: T;

TOSREADME.md2 matches

@Zoemediaโ€ขUpdated 4 days ago
39```
40โ”œโ”€โ”€ backend/
41โ”‚ โ”œโ”€โ”€ index.ts # Main API entry point
42โ”‚ โ”œโ”€โ”€ auth/ # Authentication functions
43โ”‚ โ”œโ”€โ”€ database/ # Database operations
44โ”‚ โ”œโ”€โ”€ routes/ # API routes
45โ”‚ โ””โ”€โ”€ utils/ # Utility functions
46โ”œโ”€โ”€ frontend/

TOSindex.ts3 matches

@Zoemediaโ€ขUpdated 4 days ago
18await initializeDatabase();
19
20// API routes
21app.get("/api/messages", async (c) => {
22 const messages = await getMessages();
23 return c.json(messages);
24});
25
26app.post("/api/messages", async (c) => {
27 const { username, content } = await c.req.json();
28

TOSindex.js2 matches

@Zoemediaโ€ขUpdated 4 days ago
57const fetchMessages = async () => {
58 try {
59 const response = await fetch('/api/messages');
60 if (!response.ok) {
61 throw new Error('Failed to fetch messages');
94
95 try {
96 const response = await fetch('/api/messages', {
97 method: 'POST',
98 headers: {

cardamumindex.ts13 matches

@febโ€ขUpdated 5 days ago
26});
27
28// API routes
29const api = new Hono();
30
31// Create a new game room
32api.post("/room/create", async c => {
33 const body = await c.req.json();
34 const { playerId } = body;
48
49// Join a game room
50api.post("/room/join", async c => {
51 const body = await c.req.json();
52 const { roomId, playerId } = body;
70
71// Start a game
72api.post("/game/start", async c => {
73 const body = await c.req.json();
74 const { roomId, playerId } = body;
91
92// Get game state
93api.get("/game/state", async c => {
94 const roomId = c.req.query("roomId");
95 const playerId = c.req.query("playerId");
116
117// Play a card
118api.post("/game/play", async c => {
119 const body = await c.req.json();
120 const { roomId, playerId, cardId, chosenColor } = body;
146
147// Draw a card
148api.post("/game/draw", async c => {
149 const body = await c.req.json();
150 const { roomId, playerId } = body;
176
177// Call UNO
178api.post("/game/uno", async c => {
179 const body = await c.req.json();
180 const { roomId, playerId } = body;
206
207// Challenge UNO
208api.post("/game/challenge", async c => {
209 const body = await c.req.json();
210 const { roomId, playerId, targetPlayerId } = body;
236
237// List all rooms
238api.get("/rooms", async c => {
239 const rooms = await listRooms();
240
251});
252
253// Mount the API routes
254app.route("/api", api);
255
256// Export the app

cardamumApp.tsx8 matches

@febโ€ขUpdated 5 days ago
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { Card as CardType, CardColor, GameState } from "../../shared/types";
4import { API_ENDPOINTS } from "../../shared/constants";
5import PlayerHand from "./PlayerHand";
6import GameBoard from "./GameBoard";
48 const fetchGameState = async () => {
49 try {
50 const response = await fetch(`${API_ENDPOINTS.GAME_STATE}?roomId=${roomId}&playerId=${playerId}`);
51 const data = await response.json();
52
72
73 try {
74 const response = await fetch(API_ENDPOINTS.CREATE_ROOM, {
75 method: "POST",
76 headers: {
112
113 try {
114 const response = await fetch(API_ENDPOINTS.JOIN_ROOM, {
115 method: "POST",
116 headers: {
141
142 try {
143 const response = await fetch(API_ENDPOINTS.START_GAME, {
144 method: "POST",
145 headers: {
184
185 try {
186 const response = await fetch(API_ENDPOINTS.PLAY_CARD, {
187 method: "POST",
188 headers: {
220
221 try {
222 const response = await fetch(API_ENDPOINTS.DRAW_CARD, {
223 method: "POST",
224 headers: {
248
249 try {
250 const response = await fetch(API_ENDPOINTS.CALL_UNO, {
251 method: "POST",
252 headers: {

cardamumconstants.ts10 matches

@febโ€ขUpdated 5 days ago
26};
27
28// API endpoints
29export const API_ENDPOINTS = {
30 CREATE_ROOM: "/api/room/create",
31 JOIN_ROOM: "/api/room/join",
32 START_GAME: "/api/game/start",
33 GAME_STATE: "/api/game/state",
34 PLAY_CARD: "/api/game/play",
35 DRAW_CARD: "/api/game/draw",
36 CALL_UNO: "/api/game/uno",
37 CHALLENGE_UNO: "/api/game/challenge"
38};

cardamumtypes.ts1 match

@febโ€ขUpdated 5 days ago
47}
48
49// API response types
50export interface JoinRoomResponse {
51 success: boolean;

groq-api2 file matches

@cameronpakโ€ขUpdated 1 hour ago

create-val-api-demo1 file match

@shouserโ€ขUpdated 16 hours ago
socialdata
Affordable & reliable alternative to Twitter API: โžก๏ธ Access user profiles, tweets, followers & timeline data in real-time โžก๏ธ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates โžก๏ธ Simple integration
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com