* * a simple example of using the fast api * ``` * npx tsx example/fast.ts * ```
()
| 8 | * ``` |
| 9 | */ |
| 10 | async function main() { |
| 11 | const client = new Midjourney({ |
| 12 | ServerId: <string>process.env.SERVER_ID, |
| 13 | ChannelId: <string>process.env.CHANNEL_ID, |
| 14 | SalaiToken: <string>process.env.SALAI_TOKEN, |
| 15 | Debug: true, |
| 16 | Ws: true, |
| 17 | }); |
| 18 | await client.Connect(); |
| 19 | await client.Fast(); |
| 20 | const msg = await client.Info(); |
| 21 | console.log({ msg }); |
| 22 | client.Close(); |
| 23 | } |
| 24 | main() |
| 25 | .then(() => { |
| 26 | console.log("finished"); |