2 * This app creates a webcam-based image processing application with spooky effects.
3 * It requests webcam permissions, displays the video feed, and applies visual and audio effects.
4 * We use React for the UI, the browser's MediaDevices API for webcam access,
5 * and Web Audio API for continuous audio effects.
6 */
7
1# Campsite API
2
3Note: this Val has been deprecated. Please use our official JS/TS SDK: https://www.npmjs.com/package/campsite-client
17```
18
19If you want to use an apiToken as a password:
20
21```ts
5}) {
6 const response = await fetch(
7 `https://api.github.com/repos/${repoOwner}/${repoName}/milestones?state=open&sort=due_on&direction=asc`,
8 {
9 headers: {
37
38 const response = await fetch(
39 `https://api.github.com/repos/${repoOwner}/${repoName}/issues`,
40 {
41 method: "POST",
81 setHtmlContent('');
82 try {
83 const response = await fetch(`/api?url=${encodeURIComponent(url)}`);
84 if (!response.ok) {
85 throw new Error(`HTTP error! status: ${response.status}`);
194 </button>
195 </form>
196 <p className="note">Note: This tool uses the PageSpeed Insights API without authentication, which has usage limits. For higher quotas, consider using an API key.</p>
197 <div className="content-wrapper">
198 <div className="results-container">
267 const url = new URL(request.url);
268
269 if (url.pathname === "/api") {
270 const testUrl = url.searchParams.get("url");
271 if (!testUrl) {
279 }
280
281 const apiUrl = `https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=${encodeURIComponent(testUrl)}`;
282
283 try {
284 const response = await fetch(apiUrl);
285 if (!response.ok) {
286 throw new Error(`HTTP error! status: ${response.status}`);
137 try {
138 // Make a POST request to the dummy URL
139 const response = await fetch('https://example.com/api/save', {
140 method: 'POST',
141 headers: {
1# Manage your blobs using VS Code !
2
3Just fork this val to install it, and use an api token to authenticate.
4
5
3async function getWeather() {
4 const response = await fetch(
5 "https://api.open-meteo.com/v1/forecast?latitude=48.7758&longitude=9.1829¤t=temperature_2m,weathercode&daily=weathercode,temperature_2m_max,temperature_2m_min&timezone=Europe%2FBerlin"
6 );
7 return await response.json();
6
7// Replace with your actual access token and Mastodon instance URL
8const MASTODON_TOKEN = Deno.env.get("MASTODON_API_KEY");
9const MASTODON_URL = "https://mastodon.social";
10
130 formData.append("description", altText);
131
132 const uploadResponse = await fetch(`${MASTODON_URL}/api/v2/media`, {
133 method: "POST",
134 headers: {
149 const mediaId = await uploadImage(imageBuffer, altText);
150
151 const postResponse = await fetch(`${MASTODON_URL}/api/v1/statuses`, {
152 method: "POST",
153 headers: {
1import { BskyAgent, BlobRef, RichText } from 'npm:@atproto/api';
2
3export async function blueskyPostWithImage(statusText: string, imageBuffer: any, altText: string) {