Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
piloking committed Oct 13, 2024
1 parent 77df760 commit d6118b1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/send-img.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Client } from "@evex/linejs";

const client = new Client();

await client.login({
email: "YOUR_EMAIL",
password: "YOUR_PASSWORD",
polling: [], // no polling
});

await client.uploadObjTalk(
"mid",
"image", // content type
await fetch("https://avatars.githubusercontent.com/u/121654029").then(r => r.blob()), // blob
"i.png" // file name
)
/*
Please make sure you set the mimeType to blob or the filename to the correct extension!
*/

0 comments on commit d6118b1

Please sign in to comment.