Skip to content

Instantly share code, notes, and snippets.

@brianellin
brianellin / route.ts
Last active January 23, 2025 07:33
Portland Public School Lunch Bluesky Bot
import { NextResponse } from 'next/server';
import { anthropic } from '@ai-sdk/anthropic';
import { generateObject, GenerateObjectResult } from 'ai';
import { z } from 'zod';
import FirecrawlApp, { ScrapeResponse } from '@mendable/firecrawl-js';
import { Bot } from '@skyware/bot';
export const dynamic = 'force-dynamic';
export const maxDuration = 300;
# This code sample shows how to make the auth_info API call using Python.
import urllib
import urllib2
# json is native in python 2.6, but must be installed for previous versions
import json
# Step 1) Extract the token from your environment. If you are using app engine,
# you'd do something like:
<?php
// Below is a very simple PHP 5 script that implements the RPX token URL processing.
// The code below assumes you have the CURL HTTP fetching library.
$rpxApiKey = 'REPLACE_WITH_YOUR_RPX_API_KEY';
if(isset($_POST['token'])) {
/* STEP 1: Extract token POST parameter */
$token = $_POST['token'];