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

nodeless-io

v0.0.2

Published

A simple, wrapper for making API requests to nodeless.io written in TypeScript

Downloads

6

Readme

Nodeless.io API wrapper

See the API docs for more info https://nodeless.io/api-docs

Install

npm i nodeless-io

Usage

import { Nodeless } from 'nodeless-io';

//  constructor(API_KEY: string, API_VERSION = '1', testnet = false)
const nodeless = new Nodeless('MY_API_KEY', '1', true);

// Check the status of the API
const serverStatus = await nodeless.getStatus();

// Paywalls
const myPaywallList = await nodeless.getAllPaywalls();
const newPaywall = await nodeless.createPaywall({
  name: 'yzfterrucckaksq',
  type: 'redirect',
  price: 629,
});
const paywallID = '9ff30e10-2949-4735-8ea3-56eb42a1306d';
const thatPaywall = await nodeless.getPaywall(paywallID);
const updatedPaywall = await nodeless.updatePaywall(paywallID, {
  name: 'lacavwrpkvzab',
  type: 'download',
  price: 973,
});
// delete
await nodeless.deletePaywall(paywallID);

// Paywall requests
const requestID = 'aut';
const newPaywallRequest = await nodeless.createPayWallRequest(paywallID);
const thatPaywallRequest = await nodeless.getPayWallRequest(
  paywallID,
  requestID
);
const paywallRequestStatus = await nodeless.getPayWallRequestStatus(
  paywallID,
  requestID
);

// Paywall Webhooks
const webhookID = 'perspiciatis';
const allPaywallWebhooks = await nodeless.getAllPaywallWebhooks(paywallID);
const newPaywallWebhook = await nodeless.createPaywallWebhook(paywallID, {
  type: 'store',
  url: 'http://harvey.biz/',
  events: ['cancelled'],
  secret: 'est',
  status: 'inactive',
});
const thatPaywallWebhook = await nodeless.getPaywallWebhook(
  paywallID,
  webhookID
);
const updatedPaywallWebhook = await nodeless.updatePaywallWebhook(
  paywallID,
  webhookID,
  {
    url: 'http://koss.net/asperiores-itaque-autem-doloribus-nulla',
    events: ['pending_confirmation'],
    status: 'inactive',
  }
);
// delete
await nodeless.deletePaywallWebhook(paywallID, webhookID);

// Store Invoices
const storeID = '54fbc40d-a8a1-481d-b010-dea627eb491e';
const invoiceID = 'ad';
const storeInvoice = await nodeless.createStoreInvoice(storeID, {
  amount: 100.5,
  currency: 'USD',
  buyerEmail: '[email protected]',
  redirectUrl: 'http://roob.info/ab-corrupti-distinctio-id-est',
  metadata: {
    key: 'value',
  },
});
const thatStoreInvoice = await nodeless.getStoreInvoice(storeID, invoiceID);
const thatStoreInvoiceStatus = await nodeless.getStoreInvoiceStatus(
  storeID,
  invoiceID
);

// Store Webhooks
const allMyStoreWebhooks = await nodeless.getAllStoreWebhooks(storeID);
const newStoreWebhook = await nodeless.createStoreWebhook(storeID, {
  type: 'donation_page',
  url: 'https://www.kuhn.com/nulla-velit-non-repudiandae-voluptas-deleniti-neque-dolores-dolores',
  events: ['expired'],
  secret: 'voluptates',
  status: 'active',
});
const thatStoreWebhook = await nodeless.getStoreWebhook(storeID, webhookID);
const updatedStoreWebhook = await nodeless.updateStoreWebhook(
  storeID,
  webhookID,
  {
    url: 'http://simonis.com/voluptas-aperiam-voluptatem-eum-voluptatem-mollitia-aut-autem',
    events: ['overpaid'],
    status: 'inactive',
  }
);
// delete
await nodeless.deleteStoreWebhook(storeID, webhookID);

// Stores
const allMyStores = await nodeless.getAllStores();
const thatStore = await nodeless.getStore(storeID);

// Transactions
const transactionID = '2cas07-0c8n70n923-72c93-c2389';
const allMyTransactions = await nodeless.getAllTransactions();
const allMyTransactionFees = await nodeless.getAllTransactions(true);
const thatTransaction = await nodeless.getTransaction(transactionID);

Every method returns a promise so you can also use .then() chaining if you prefer:

nodeless.getAllTransactions().then((json) => {
  // do something with json
});

For simplicity all method promises resolve an object. If the API responds with an object, you get that, otherwise just an empty onject {}. In the case of an error, the object returned is in the format { error: 'A string with info about the error' }.