Skip to content

Commit

Permalink
Merge pull request #91 from erictik/info
Browse files Browse the repository at this point in the history
add Info
  • Loading branch information
zcpua authored Jun 5, 2023
2 parents d0829c7 + 0b46d78 commit cb8f8a3
Show file tree
Hide file tree
Showing 8 changed files with 470 additions and 242 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Node.js Package
env:
APPVERSION: v2.4.${{ github.run_number }}
APPVERSION: v2.5.${{ github.run_number }}
on:
workflow_dispatch:
push:
Expand Down
29 changes: 29 additions & 0 deletions example/imagine-info.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import "dotenv/config";
import { Midjourney } from "../src";
/**
*
* a simple example of using the info api
* ```
* npx tsx example/imagine-info.ts
* ```
*/
async function main() {
const client = new Midjourney({
SalaiToken: <string>process.env.SALAI_TOKEN,
Debug: true,
Ws: true,
});
await client.init();
const msg = await client.Info();
console.log({ msg });
}
main()
.then(() => {
console.log("finished");
process.exit(0);
})
.catch((err) => {
console.log("finished");
console.error(err);
process.exit(1);
});
Loading

0 comments on commit cb8f8a3

Please sign in to comment.