31Refer to [Twitter's search operators](https://socialdata.gitbook.io/docs/twitter-tweets/retrieve-search-results-by-keyword#endpoint-parameters) to fine-tune your query.
32
33### 4. Test API call
34Set `isProd = false` in the code if you are testing, to ensure there are enough tweets to display. <br>
35Toggle it back to `true` when you're ready to run this cron job in production and actuall send notifications.
60
61### NOTE: Usage Limits
62This val uses the SocialData API for Twitter data:
63
64- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.
3
4## HTTP
5Hono API with
6- `GET` route for all message
7. `POST` route for sending a message
202});
203
204// Root endpoint with API documentation
205app.get('/', (c) => {
206 return c.json({
207 message: 'Contacts API',
208 endpoints: {
209 'POST /contacts': 'Create or update a contact (name, address, zipcode, phone_number)',
7
8// Import route modules
9import api from "./routes/api/api.ts";
10import auth from "./routes/auth.ts";
11import root from "./routes/root.ts";
34
35// Mount route modules
36app.route("/api", api);
37app.route("/tasks", tasks);
38app.route("/demo", demo);
1import { Hono } from "npm:hono";
2
3// Import route modules
4import cobrowse from "./cobrowse.ts";
5import database from "./database.ts";
27 }}
28 >
29 <h3 className="font-bold capitalize">
30 {item?.properties?.Name?.title?.[0]?.plain_text}
31 </h3>
10 // src="https://glance--90537b2ecab54268bf831875fe1d0158.web.val.run"
11 // src="https://lightweight--ef4179e03fc011f0bc0c76b3cceeab13.web.val.run"
12 // src="/api/iframe"
13 // src={`/api/${content}`}
14 // src={`/api/${content}?user=${userId}`}
15 src={contentURL}
16 title={`Glance content: ${content}`}
12});
13
14// API endpoint for saving MAC address
15app.post("/api/save-mac", async (c) => {
16 try {
17 const { blob } = await import("https://esm.town/v/std/blob");
28});
29
30// API endpoint for getting saved MAC address
31app.get("/api/get-mac", async (c) => {
32 try {
33 const { blob } = await import("https://esm.town/v/std/blob");
321 <div id="logs" class="logs">
322 <div class="log-entry log-info">Ready to connect to Paperang P1 printer...</div>
323 <div class="log-entry log-debug">Web Bluetooth API: <span id="bluetoothSupport">Checking...</span></div>
324 </div>
325 </div>
1# Paperang P1 Web Bluetooth Printer
2
3A web-based interface for printing to Paperang P1 thermal printers using the Web Bluetooth API.
4
5## Features
33## Browser Requirements
34
35- Chrome, Edge, or Opera (Web Bluetooth API support required)
36- HTTPS connection (required for Bluetooth access)
37- Desktop or Android (iOS doesn't support Web Bluetooth)
48```
49โโโ backend/
50โ โโโ index.ts # Hono server with MAC storage API
51โโโ frontend/
52โ โโโ index.html # Main UI
60## Technical Details
61
62- Uses Web Bluetooth API for printer communication
63- Implements Paperang P1 protocol with CRC32 validation
64- Converts text to 384px wide 1-bit bitmaps
247 <div id="logs" class="logs">
248 <div class="log-entry log-info">Ready to connect to Paperang P1 printer...</div>
249 <div class="log-entry log-debug">Web Bluetooth API: <span id="bluetoothSupport">Checking...</span></div>
250 </div>
251 </div>