Skip to content

Commit

Permalink
better instructions and fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
nociza committed Mar 30, 2023
1 parent eb256bf commit dc309b6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,16 @@ BING_IMAGE_COOKIE: <your Bing Image Search cookie>
### Import the package

```
import bimg from 'bimg';
import { generateImageFiles, generateImagesLinks } from "bimg";
const imageLinks = await generateImagesLinks(prompt); // returns an array of 4 image links
const imageFiles = await generateImageFiles(prompt); // returns an array of 4 image files
```

The image file is a object of
```
{
name: string,
data: string // base64 encoded image data from Buffer
}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bimg",
"version": "0.1.0",
"version": "0.1.1",
"description": "A reverse-engineered Bing Image Creation API",
"main": "dist/index.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./imgen";
export * from "./config";
export * from "./imgen.js";
export * from "./config.js";

0 comments on commit dc309b6

Please sign in to comment.