# @websiteshot/nodejs-client

> NodeJS Client for Websiteshot.

Latest version **0.0.10** (published 2021-01-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @websiteshot/nodejs-client
pnpm add @websiteshot/nodejs-client
yarn add @websiteshot/nodejs-client
bun add @websiteshot/nodejs-client
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2021-01-24 |
| First published | 2021-01-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | adam.urban@gmail.com |
| Maintainers | urbanisierung |

## Links

- npm: https://www.npmjs.com/package/@websiteshot/nodejs-client
- Repository: https://github.com/websiteshot/nodejs-client
- Homepage: https://github.com/websiteshot/nodejs-client#readme
- Issues: https://github.com/websiteshot/nodejs-client/issues
- npm.io page: https://npm.io/package/@websiteshot/nodejs-client

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.21.1

## Recent versions

- 0.0.10 (latest) — 2021-01-24
- 0.0.9 — 2021-01-24
- 0.0.8 — 2021-01-14
- 0.0.7 — 2021-01-04
- 0.0.6 — 2021-01-04
- 0.0.5 — 2021-01-03
- 0.0.4 — 2021-01-02
- 0.0.3 — 2021-01-01
- 0.0.2 — 2021-01-01
- 0.0.1 — 2021-01-01

## README

# Websiteshot NodeJS Client

<hr />

<div align="center">
    <a href="https://websiteshot.app/">
        <img src="./assets/logo-mini.png">
    </a>
</div>

<div align="center">
<p>Never spend time again to create awesome screenshots of your websites.</p>
</div>

<div align="center">
<a style="margin: 1em;" href="https://websiteshot.app">Website</a> | <a style="margin: 1em;" href="https://console.websiteshot.app">Console</a> | <a style="margin: 1em;" href="https://github.com/websiteshot/community/discussions">Community</a> | <a style="margin: 1em;" href="https://docs.websiteshot.app">Documentation</a>
</div>

<hr />

## Installation

```bash
npm i @websiteshot/nodejs-client --save
```

## Usage

### Import Controller and Types

```js
import {
  Config,
  CreateRequest,
  ScreenshotParameter,
  Url,
  WebsiteshotController,
} from '@websiteshot/nodejs-client'
```

### Init Client

```js
const config: Config = {
  projectId: '...',
  apikey: '...',
}

const websiteshotController = new WebsiteshotController(config)
```

### Create Screenshot Job

```js
const screenshotParameter: ScreenshotParameter = {
  width: 1200,
  height: 720,
}

const urls: Url[] = [
  {
    url: 'https://websiteshot.app',
    name: 'Websiteshot',
  },
]

const createRequest: CreateRequest = {
  screenshotParameter,
  urls,
}

await websiteshotController.create(createRequest)
```

### Create Screenshot Job with Template

```js
const createRequest: CreateRequest = {
  templateId: '...',
}

await websiteshotController.create(createRequest)
```

### Get Screenshot Jobs

```js
const config: Config = {
  projectId: '...',
  apikey: '...',
}

const websiteshotController = new WebsiteshotController(config)

const response: GetResponse = await websiteshotController.get(jobId)
```

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