import { SpeakeasyCodeSamples } from "@speakeasyapi/code-samples";
const speakeasyCodeSamples = new SpeakeasyCodeSamples({
apiKey: "<YOUR_API_KEY_HERE>",
registryUrl: "https://spec.speakeasy.com/org/ws/my-source",
});
async function run() {
const result = await speakeasyCodeSamples.codeSamples.get({
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
operationIds: [
"getPetById",
],
languages: [
"python",
],
});
// Handle the result
console.log(result);
}
run();