githubPRAlertmain.tsx4 matches
8* 1. Fork this val
9* 2. Create a custom integration in your Campsite organization settings [1]
10* 3. Add the API token as an environment variable named `CAMPSITE_API_TOKEN` in Val Town
11* 4. Add the project ID where you want to create alerts as `PR_ALERTS_PROJECT_ID`
12* 5. Copy the HTTP endpoint for this Val and add it as a webhook in your GitHub settings [2]
16* [2] https://github.com/<username>/<repo>/settings/hooks
17*
18* Campsite API docs:
19* https://campsite.com/docs
20*/
2223// These environment variables are required:
24const CAMPSITE_API_KEY = Deno.env.get("CAMPSITE_API_KEY");
2526// Set these to your own values:
32}
3334const campsite = new Campsite({ apiKey: CAMPSITE_API_KEY });
3536try {
email_channelmain.tsx5 matches
67// Required environment variables
8const CAMPSITE_API_KEY = Deno.env.get("CAMPSITE_EMAILS_API_KEY");
9const CAMPSITE_CHANNEL_ID = "<your-channel-id>";
1015// Other providers are available via Vercel's AI SDK:
16// https://sdk.vercel.ai/docs/introduction#model-providers
17const OPENAI_API_KEY = Deno.env.get("OPENAI_API_KEY");
1819const campsite = new Campsite({ apiKey: CAMPSITE_API_KEY });
2021export async function emailValHandler(payload: Email) {
29let subject = payload.subject || "Forwarded email (no subject)";
3031if (OPENAI_API_KEY) {
32const openai = createOpenAI({ apiKey: OPENAI_API_KEY });
3334// Extract name and email from the forwarded message
dailyStandupmain.tsx3 matches
7* https://www.campsite.com/blog/effective-daily-standups-for-distributed-teams
8*
9* Campsite API docs:
10* https://campsite.com/docs
11*/
1314// These environment variables are required:
15const CAMPSITE_API_KEY = Deno.env.get("CAMPBOT_API_KEY");
1617// Set these to your own values:
37});
3839const campsite = new Campsite({ apiKey: CAMPSITE_API_KEY });
4041await campsite.posts.create({
axiomNotifiermain.tsx5 matches
7* [1] https://axiom.co
8*
9* Campsite API docs:
10* https://campsite.com/docs
11*/
1213// These environment variables are required:
14const CAMPSITE_API_KEY = Deno.env.get("CAMPSITE_API_KEY");
1516// Set these to your own values:
4041const campsiteResponse = await fetch(
42`https://api.campsite.com/v2/threads/${CAMPSITE_ALERTS_THREAD_ID}/messages`,
43{
44method: "POST",
45headers: {
46"Content-Type": "application/json",
47Authorization: `Bearer ${CAMPSITE_API_KEY}`,
48},
49body: JSON.stringify({
5455if (!campsiteResponse.ok) {
56throw new Error(`Campsite API error: ${campsiteResponse.statusText}`);
57}
58
114<title>Course Content Viewer</title>
115<meta name="viewport" content="width=device-width, initial-scale=1">
116<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
117<style>${css}</style>
118</head>
blob_adminREADME.md1 match
11[](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
1213It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
1415# TODO
modifyImageREADME.md1 match
1Code from https://deno.com/blog/build-image-resizing-api
23Useful for compressing an image before sending to chatgpt4v, for example
6- **Analogue Clock Schedule:** Displays daily activities in an analogue clock format with segments representing different time slots.
7- **Chore Tracker:** Lists chores for the day, with checkboxes for completion tracking.
8- **Customizable:** Accepts schedule and todoList props, allowing dynamic data from APIs or other sources.
9- **Real-time Updates:** The clock updates every second to show the current time.
10- **Responsive Design:** Styled with Tailwind CSS for a modern and clean appearance.
getLatestGitHubRunREADME.md2 matches
10TODO
11- Add handling for no runs etc
12- Handling for GitHub API limits
13- API versioning
1415Migrated from folder: examples/getLatestGitHubRun
9394export type RequestOptions = {
95apiKey?: string;
96};
9798type CampsiteAPIOptions = {
99baseUrl?: string;
100};
103104/**
105* Campsite API Client
106*/
107export class CampsiteAPI {
108private apiKey: string;
109private baseUrl: string;
110111constructor(apiKey?: string, options?: CampsiteAPIOptions) {
112this.apiKey = apiKey || Deno.env.get("CAMPSITE_API_KEY") || "";
113this.baseUrl = options?.baseUrl || "https://api.campsite.com/v2";
114}
115135const headers = {
136"Content-Type": "application/json",
137Authorization: `Bearer ${this.apiKey}`,
138};
139147const errorData = await response.json();
148console.error(errorData);
149throw new Error(`API request failed: ${response.statusText}`);
150}
151199}
200201function createCampsiteAPI(options?: RequestOptions): CampsiteAPI {
202return new CampsiteAPI(options?.apiKey);
203}
204205export async function getPost(postId: string, options?: RequestOptions) {
206const api = createCampsiteAPI(options);
207return api.getPost(postId);
208}
209212options?: RequestOptions
213) {
214const api = createCampsiteAPI(options);
215return api.createPost(data);
216}
217220options?: RequestOptions
221) {
222const api = createCampsiteAPI(options);
223return api.createComment(data);
224}
225228options?: RequestOptions
229) {
230const api = createCampsiteAPI(options);
231return api.createMessage(data);
232}
233236options?: RequestOptions
237) {
238const api = createCampsiteAPI(options);
239return api.listChannels(params);
240}
241