import Hawkings from "@hawkings/sdk";const hk = new Hawkings();const course = await hk.courses.create({ name: "Intro to Special Relativity", language: "en", hours: 12,});console.log(course.id);
$hk = new \Hawkings\Client();$course = $hk->courses->create([ 'name' => 'Intro to Special Relativity', 'language' => 'en', 'hours' => 12,]);echo $course->id;
from hawkings import Hawkingshk = Hawkings()course = hk.courses.create( name="Intro to Special Relativity", language="en", hours=12,)print(course.id)
await hk.courses.generateSyllabus(course.id, { brief: "An introductory undergraduate course on special relativity, " + "ending with the equivalence of mass and energy.",});// Poll until ready (≈ 30s)const ready = await hk.poll(() => hk.courses.retrieve(course.id), { until: c => c.status === "ready",});
$hk->courses->generateSyllabus($course->id, [ 'brief' => 'An introductory undergraduate course on special relativity, ' . 'ending with the equivalence of mass and energy.',]);// Poll until ready (≈ 30s)$ready = $hk->poll( fn () => $hk->courses->retrieve($course->id), ['until' => fn ($c) => $c->status === 'ready'],);