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%22Image%20title%22?q=api&page=69&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 19740 results for "api"(2698ms)

myApi1 file match

@ralphiteโ€ขUpdated 1 year ago

myApi1 file match

@iyzgโ€ขUpdated 1 year ago

myApi1 file match

@stevebennnโ€ขUpdated 1 year ago

myApi1 file match

@alexwโ€ขUpdated 1 year ago

myApi1 file match

@zpnicholsโ€ขUpdated 1 year ago

expressApiTest2 file matches

@z233โ€ขUpdated 1 year ago

myApi1 file match

@iansavchenkoโ€ขUpdated 1 year ago

myApi1 file match

@morten_holmโ€ขUpdated 1 year ago

myApi1 file match

@nickgehringโ€ขUpdated 1 year ago

heapify1 file match

@aeschylusโ€ขUpdated 1 year ago

reddit-checkerREADME.md18 matches

@sunnyatlightswitchโ€ขUpdated 49 mins ago
5## ๐Ÿš€ Features
6
7- **Real-time Monitoring**: Uses Reddit's official API for reliable access
8- **Keyword Detection**: Monitors posts for configurable keywords
9- **Email Notifications**: Sends detailed email alerts when matches are found
15
16```
17โ”œโ”€โ”€ reddit-api-monitor.ts # Main monitoring script (cron job) โœ… READY
18โ”œโ”€โ”€ test-reddit-api.ts # API testing and setup tool (HTTP) โœ… READY
19โ”œโ”€โ”€ test-main-monitor.ts # Manual testing for main monitor (HTTP) โœ… READY
20โ”œโ”€โ”€ test-slack.ts # Slack webhook testing tool (HTTP) โœ… READY
38- **Post Limit**: 25 posts per check
39
40### Reddit API Credentials โœ… CONFIGURED
41
42- **Client ID**: `151sZ8h5TaHVZGZZn0rOhA`
47### Automatic Monitoring โœ… READY
48
49The main monitor (`reddit-api-monitor.ts`) runs automatically as a cron job. To configure the schedule:
50
511. Go to the Val Town web UI
522. Find the `reddit-api-monitor.ts` file
533. Edit the cron schedule as needed (recommended: every 15-30 minutes)
54
55### Manual Testing โœ… WORKING
56
57#### Test Reddit API Connection
58```
59GET /test-reddit-api.ts?action=help
60```
61
62#### Test Authentication โœ… VERIFIED
63```
64GET /test-reddit-api.ts?action=auth&client_id=151sZ8h5TaHVZGZZn0rOhA
65```
66
67#### Test Full Functionality โœ… VERIFIED (Found 1 match in recent test)
68```
69GET /test-reddit-api.ts?action=test&client_id=151sZ8h5TaHVZGZZn0rOhA&subreddit=lovable
70```
71
85#### Reset Stored Data
86```
87GET /test-reddit-api.ts?action=reset
88```
89
126### Adding New Keywords
127
128Edit the `CONFIG` object in `reddit-api-monitor.ts`:
129
130```typescript
158## ๐Ÿ” Security
159
160- Reddit API credentials are configured and working
161- Access tokens are cached and automatically refreshed
162- All API calls use proper authentication headers
163
164## โœ… System Status
166### Current Status: FULLY OPERATIONAL WITH SLACK INTEGRATION
167
168- โœ… Reddit API authentication working
169- โœ… Post fetching functional
170- โœ… Keyword matching operational
197### Debug Tools โœ… ALL WORKING
198
199- Use `test-reddit-api.ts` to verify API connectivity
200- Use `test-main-monitor.ts` to run the monitor manually
201- Check Val Town logs for detailed error information
203## ๐Ÿ“Š Recent Test Results
204
205- **API Connection**: โœ… Successful
206- **Authentication**: โœ… Working
207- **Post Fetching**: โœ… Retrieved 10 posts from r/lovable
215## ๐Ÿ”„ Backup Options
216
217The project includes an RSS-based monitor (`reddit-rss-monitor.ts`) as a backup option if the API approach encounters issues. The RSS monitor has similar functionality but uses Reddit's RSS feeds instead of the official API.

reddit-checkertest-slack.ts1 match

@sunnyatlightswitchโ€ขUpdated 50 mins ago
149 color: "danger",
150 title: "Monitor Failed",
151 text: `Reddit API monitor encountered an error: Test error message for webhook testing`,
152 footer: "Reddit Monitor",
153 ts: Math.floor(Date.now() / 1000)
apiry
snartapi