-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from erictik/describe
add describe api
- Loading branch information
Showing
13 changed files
with
297 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import "dotenv/config"; | ||
import { Midjourney } from "../src"; | ||
/** | ||
* | ||
* a simple example of using the describe api | ||
* ``` | ||
* npx tsx example/describe.ts | ||
* ``` | ||
*/ | ||
async function main() { | ||
const client = new Midjourney({ | ||
ServerId: <string>process.env.SERVER_ID, | ||
ChannelId: <string>process.env.CHANNEL_ID, | ||
SalaiToken: <string>process.env.SALAI_TOKEN, | ||
Debug: true, | ||
Ws: true, | ||
}); | ||
await client.init(); | ||
const msg = await client.Describe( | ||
"https://img.ohdat.io/midjourney-image/1b74cab8-70c9-474e-bfbb-093e9a3cfd5c/0_1.png" | ||
); | ||
console.log({ msg }); | ||
} | ||
main().catch((err) => { | ||
console.log("finished"); | ||
console.error(err); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export type UploadParam = { | ||
filename: string; | ||
file_size: number; | ||
id: number | string; | ||
}; | ||
|
||
export type UploadSlot = { | ||
id: number; | ||
upload_filename: string; | ||
upload_url: string; | ||
}; | ||
export type DiscordImage = { | ||
id: number | string; | ||
filename: string; | ||
upload_filename: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from "./message"; | ||
export * from "./config"; | ||
export * from "./discord"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.