npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/archive_wayback

v4.0.0

Published

DataFire integration for Wayback API

Downloads

7

Readme

@datafire/archive_wayback

Client library for Wayback API

Installation and Usage

npm install --save @datafire/archive_wayback
let archive_wayback = require('@datafire/archive_wayback').create();

.then(data => {
  console.log(data);
});

Description

API for Internet Archive's Wayback Machine

Actions

wayback.v1.available.get

archive_wayback.wayback.v1.available.get({
  "url": ""
}, context)

Input

  • input object
    • url required string: A single URL to query.
    • timestamp string: Timestamp requested in ISO 8601 format. The following formats are acceptable:
    • callback string: Specifies a JavaScript function func, for a JSON-P response. When provided, results are wrapped as callback(data), and the returned MIME type is application/javascript. This causes the caller to automatically run the func with the JSON results as its argument.
    • timeout number: Timeout is the maximum number of seconds to wait for the availability API to get its underlying results from the CDX server. The default value is 5.0.
    • closest string (values: either, before, after): The direction specifies whether to match archived timestamps that are before the provided one, after, or the default either (closest in either direction). Must be before, after, or either. May be overidden by individual requests.
    • status_code integer (values: 200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 421, 426, 428, 429, 431, 500, 501, 502, 503, 504, 505, 506, 507, 511): HTTP status codes to filter by. Only results with these codes will be returned
    • tag string: The optional tag can have any value, and is returned with the results; it can be used to help collate input and output values.

Output

wayback.v1.available.post

archive_wayback.wayback.v1.available.post({
  "url": ""
}, context)

Input

  • input object
    • url required string: A single URL to query.
    • timestamp string: Timestamp requested in ISO 8601 format. The following formats are acceptable:
    • callback string: Specifies a JavaScript function func, for a JSON-P response. When provided, results are wrapped as callback(data), and the returned MIME type is application/javascript. This causes the caller to automatically run the func with the JSON results as its argument.
    • timeout number: Timeout is the maximum number of seconds to wait for the availability API to get its underlying results from the CDX server. The default value is 5.0.
    • closest string (values: either, before, after): The direction specifies whether to match archived timestamps that are before the provided one, after, or the default either (closest in either direction). Must be before, after, or either. May be overidden by individual requests.
    • status_code integer (values: 200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 421, 426, 428, 429, 431, 500, 501, 502, 503, 504, 505, 506, 507, 511): HTTP status codes to filter by. Only results with these codes will be returned
    • tag string: The optional tag can have any value, and is returned with the results; it can be used to help collate input and output values.
    • body AvailabilityRequests

Output

Definitions

ArchivedResult

  • ArchivedResult object
    • snapshot required Snapshot
    • tag string: The user-supplied tag for use in collation
    • timestamp required string: The intepreted timestamp requested, in RFC 3339 format
    • url required string: The URL requested

AvailabilityRequest

  • AvailabilityRequest object
    • closest string (values: either, after, before): The direction to find the closest snapshot to the requested timestamp
    • tag string: A user-supplied tag, used for collation
    • timestamp string: Timestamp requested in ISO 8601 format. The following formats are acceptable: - YYYY - YYYY-MM - YYYY-MM-DD - YYYY-MM-DDTHH:mm:SSz - YYYY-MM-DD:HH:mm+00:00
    • url required string: The URL requested

AvailabilityRequests

AvailabilityResults

  • AvailabilityResults object

Error

  • Error object
    • code integer
    • message string

Snapshot

  • Snapshot object
    • status integer: The HTTP status of the URL requested
    • timestamp string: The timestamp of the snapshot in RFC 3339 format
    • url string: The URL requested