# pavlova

> a library allowing you to generate an image or it's metadata from a custom Google Images query

Latest version **0.1.6** (published 2018-06-23) · CC-BY-NC-4.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install pavlova
pnpm add pavlova
yarn add pavlova
bun add pavlova
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2018-06-23 |
| First published | 2018-06-03 |
| Weekly downloads | 0 |
| License | CC-BY-NC-4.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Joshua Quail |
| Maintainers | realtable |
| Keywords | image, generate, image generation, library |

## Links

- npm: https://www.npmjs.com/package/pavlova
- Homepage: https://pavlova.now.sh/_src
- npm.io page: https://npm.io/package/pavlova

## Dependencies (2)

- [now-env](https://npm.io/package/now-env.md) ^3.1.0
- [request](https://npm.io/package/request.md) ^2.87.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.1.6 (latest) — 2018-06-23
- 0.1.5 — 2018-06-23
- 0.1.4 — 2018-06-23
- 0.1.3 — 2018-06-23
- 0.1.2 — 2018-06-23
- 0.1.1 — 2018-06-03
- 0.1.0 — 2018-06-03

## README

### **__*ALERT USER: Please go to [pavlova.now.sh](https://pavlova.now.sh) to view an open source and up to date version of this repository.*__**

# pavlova
The pavlova library allows you to get images from custom Google image searches.

## Installation
1. Run `npm i pavlova` in the shell to install the module.
2. Add the following to the top of your file your file.
```js
const pavlova = require('pavlova');
// the rest of your code...
```

## Usage
```js
var response = pavlova.search(search);
```
*search* - an object containing query data

```JSON
{
  "query": "your search query",
  "output": "an output file (optional)",
  "size": "size: huge, icon, large, medium, small, xlarge or xxlarge",
  "color": "color: color, gray or mono",
  "filetype": "filetype: the extension of an image type",
  "safeSearch": "safe search: high, medium or off"
}
```

*response* - an object containing information about the image returned

```JSON
{
  "url": "url of the image",
  "page": "url of the page where the image originated",
  "title": "title of the page where the image originated",
  "height": "the image's height in pixels",
  "width": "the image's width in pixels",
  "written": "whether the image was written to the file or not"
}
```

## Examples
```js
// example 1
var res = pavlova.search({
  "query": "Hello, World!",
  "output": "helloworld.png"
});

// example 2
var res2 = pavlova.search({
  "query": "uhfaiuharguguaierg",
  "output": "keymash.jpg"
});
// res2.written is false because no search results were returned

// example 3
var res3 = pavlova.search({
  "query": "foo bar baz"
});
// res2.written is false because no query was supplied
```

## Changelog
**0.1.0**
+ Added `search(search)` function
**0.1.1**
+ README.md

---
_Source: https://npm.io/package/pavlova · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
