1.2.0 • Published 8 days ago

@speedyshot/capture v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 days ago

@speedyshot/capture on NPM

@SpeedyShot/Capture

A TypeScript Library for using the SpeedyShot Service.

Features

This library provides an interface to the SpeedyShot service, clearly describing the expected parameters using TypeScript.

Furthermore, it also automatically throttles your requests to avoid hitting the max rate limit.

Installation

npm install @speedyshot/capture

Usage

Single requests

import { SpeedyShotCapture } from '@speedyshot/capture';

// Replace your api key in the constructor
// You can get an api key at https://speedyshot.com for free
const speedyShotCapture = new SpeedyShotCapture('YOUR-API-KEY');

// For single requests
const result = await speedyShotCapture.captureSingle({
    // Adjust to your desired capture parameters
    url: 'https://speedyshot.com',
    output: 'jpeg'
});

Multiple requests

import { SpeedyShotCapture } from '@speedyshot/capture';

// Replace your api key in the constructor
// You can get an api key at https://speedyshot.com for free
const speedyShotCapture = new SpeedyShotCapture('YOUR-API-KEY');

// For multiple requests
const parameters = {
    // Adjust to your desired capture parameters
    url: 'https://speedyshot.com',
    output: 'jpeg'
};

// In a real scenario, you would be using different parameters for each request
const results = await speedyShotCapture.captureMultiple([parameters, parameters]);

With custom options

import { SpeedyShotCapture } from '@speedyshot/capture';

// Replace your api key in the constructor
// You can get an api key at https://speedyshot.com for free
const customOptions = {
    // Max. concurrent requests.
    // Default is 50, min is 1, max is 100
    maxConcurrency: 75,
     
    // Include the raw axios response?
    // The result object will contain a 'raw' field with the AxiosResponse object
    includeRawResponse: true
};
const speedyShotCapture = new SpeedyShotCapture('YOUR-API-KEY', customOptions);

// For single requests
const result = await speedyShotCapture.captureSingle({
    // Adjust to your desired capture parameters
    url: 'https://speedyshot.com',
    output: 'jpeg'
});

Changelog

1.2.0 - 01/05/2024

  • Added support for storageRegion, storageEndpoint parameters so S3-Compatible storage can be used, for example Wasabi.

1.1.0 - 28/04/2024

  • Added support for hideAds, hideCookieBanners, and useSpeedyProxy features.
  • Upgraded dependencies

1.0.0 - 21/02/2024

  • Methods slightly refactored for readability with async instead of plain promises.
  • CaptureBulk method added

License

MIT

Author

@speedyshot/capture is made by SpeedyShot by CreateMyTech.

1.2.0

8 days ago

1.1.0

11 days ago

1.0.0

3 months ago

0.2.9

3 months ago

0.2.8

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago