xxxclearinghouse_orchestratorindex.ts13 matches
14}
1516interface ScrapingResult {
17website: string;
18status: 'success' | 'error';
28query: string;
29timestamp: string;
30results: ScrapingResult[];
31consolidatedProducts: any[];
32summary: {
136console.log(`Orchestrating scrape for "${query}" across ${websites.length} sites`);
137138// Parallel scraping with proper error handling
139const scrapingPromises = websites.map(async (website: string): Promise<ScrapingResult> => {
140try {
141const startTime = Date.now();
142
143// Call the URL scrape template
144const scrapingResult = await scrapeWebsite(query, website);
145const endTime = Date.now();
146148website,
149status: 'success',
150data: scrapingResult,
151metadata: {
152scrapedAt: new Date().toISOString(),
155};
156} catch (error) {
157console.error(`Error scraping ${website}:`, error);
158return {
159website,
168});
169170const scrapingResults = await Promise.all(scrapingPromises);
171172// Consolidate all successful results
173const allProducts: any[] = [];
174scrapingResults.forEach(result => {
175if (result.status === 'success' && result.data?.products) {
176allProducts.push(...result.data.products);
182183// Calculate summary statistics
184const summary = calculateSummary(scrapingResults, consolidatedProducts);
185186// Prepare final response
188query,
189timestamp: new Date().toISOString(),
190results: scrapingResults,
191consolidatedProducts,
192summary
267}
268269// Simplified scraping function that calls our URL scrape template
270async function scrapeWebsite(query: string, website: string): Promise<any> {
271// This would normally import and call the actual URL scrape template
365366// Calculate summary statistics
367function calculateSummary(results: ScrapingResult[], products: any[]): any {
368const successfulSites = results.filter(r => r.status === 'success').length;
369const totalProducts = products.length;
registry-valszons1 match
3132app.get("/", async (c: any) => {
33// Fetch vals from ValTown API
34const valtown = new ValTown();
35const vals = await valtown.me.vals.list({ limit: 100, offset: 0 });
registry-valszon1 match
99100app.get("/:zon", async (c) => {
101// Fetch vals from ValTown API
102const zon = c.req.param("zon");
103const { files } = await getZon(zon);
1// Plant Information API Tester
2class PlantAPITester {
3constructor() {
4this.apiBaseUrl = window.location.origin;
5this.initializeEventListeners();
6}
42
43try {
44const response = await fetch(`${this.apiBaseUrl}/plant/${encodeURIComponent(plantName)}`);
45const data = await response.json();
46148// Initialize the app when DOM is loaded
149document.addEventListener('DOMContentLoaded', () => {
150new PlantAPITester();
151});
puppeteer_testmain.tsx4 matches
6});
78const STEEL_API_KEY = process.env.STEEP_API_KEY;
9// Initialize Steel client with the API key from environment variables
10const client = new Steel({
11steelAPIKey: STEEL_API_KEY,
12});
1336// Connect Puppeteer to the Steel session
37browser = await puppeteer.connect({
38browserWSEndpoint: `wss://connect.steel.dev?apiKey=${STEEL_API_KEY}&sessionId=${session.id}`,
39});
40
Plantfoindex.html2 matches
4<meta charset="UTF-8">
5<meta name="viewport" content="width=device-width, initial-scale=1.0">
6<title>Plant Information API Tester</title>
7<script src="https://cdn.twind.style" crossorigin></script>
8<style>
32<!-- Header -->
33<div class="text-center mb-8">
34<h1 class="text-4xl font-bold text-green-700 mb-2">๐ฑ Plant Information API Tester</h1>
35<p class="text-gray-600">Enter a plant name to get detailed information powered by AI</p>
36</div>
puppeteer_testREADME.md3 matches
21To run it:
22231. Get your free Steel API key at https://app.steel.dev/settings/api-keys
242. Add it to your [Val Town Environment Variables](https://www.val.town/settings/environment-variables) as `STEEL_API_KEY`
253. Click `Fork` on this val
264. Click `Run` on this val
7273- [Steel Documentation](https://docs.steel.dev)
74- [API Reference](https://docs.steel.dev/api-reference)
75- [Discord Community](https://discord.gg/gPpvhNvc5R)
75### ๐ Other Export Formats
76- **CSV**: Structured data with headers for spreadsheet applications
77- **JSON**: Machine-readable format for API integration
78- **Text**: Human-readable format with detailed card information
79133โ โโโ utils.ts # Luhn algorithm, validation, bulk parsing
134โโโ backend/
135โโโ index.ts # Static file server with API endpoints
136```
137203- **LIST**: Clean format `CCNUMBER|MM|YY|CVV` (perfect for direct use)
204- **CSV**: Structured data with headers for spreadsheets
205- **JSON**: Machine-readable format for API integration
206- **TEXT**: Human-readable format with detailed information
2072. Use "Copy All" to copy to clipboard or "Export" to download as file
228- **Placeholders**: `xxx`, `xx`, `xxxx` for random
229230## API Endpoints
231232- `POST /api/generate` - Generate card (simple/custom/bulk)
233- `POST /api/validate` - Validate card number using Luhn
234- `POST /api/validate-bin` - Validate BIN format
235- `POST /api/validate-bulk` - Validate bulk format string
236- `GET /api/health` - Health check endpoint
237- `GET /api/marketplace/products` - Get all marketplace products
238- `GET /api/marketplace/products/:id` - Get specific product details
239- `POST /api/marketplace/contact` - Contact seller about a product
240241## Note
33});
3435// API endpoint to validate card numbers (for educational purposes)
36app.post("/api/validate", async c => {
37try {
38const { cardNumber } = await c.req.json();
55});
5657// API endpoint to generate card data
58app.post("/api/generate", async c => {
59try {
60const { type, customBin, bulkFormat, quantity } = await c.req.json();
158});
159160// API endpoint to validate bulk format
161app.post("/api/validate-bulk", async c => {
162try {
163const { bulkFormat } = await c.req.json();
182});
183184// API endpoint to validate BIN
185app.post("/api/validate-bin", async c => {
186try {
187const { bin, cardType } = await c.req.json();
208209// BIN lookup endpoint
210app.post("/api/bin-lookup", async c => {
211try {
212const { bin } = await c.req.json();
222}
223
224// Use BinList.net free API (no API key required)
225const response = await fetch(`https://lookup.binlist.net/${cleanBin}`);
226
265266// Health check endpoint
267app.get("/api/health", c => {
268return c.json({
269status: "healthy",
273});
274275// Marketplace API endpoints
276app.get("/api/marketplace/products", async c => {
277try {
278// In a real application, this would fetch from a database
311"Custom Dashboard Builder",
312"Advanced Reporting",
313"API Integration"
314],
315inStock: true,
351});
352353app.get("/api/marketplace/products/:id", async c => {
354try {
355const id = c.req.param("id");
404});
405406app.post("/api/marketplace/contact", async c => {
407try {
408const { productId, message, contactInfo } = await c.req.json();