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 🙏

© 2026 – Pkg Stats / Ryan Hefner

swipe-sdk

v1.0.3

Published

This project is an sdk built for Swipe-Telecoms API

Readme

swipe-sdk

A Javascript project SDK built for Swipe-Telecoms API services.

You can vist our homepage and our official Postman Documentation for more information and insights.

Installation

Run

npm i swipe-sdk

Use

To use this package in your project, import the method below.

import SwipeSdk from "swipe-sdk";

const apiKey = "xxxx-xxxx-xxxx";
const swipe = new SwipeSdk(apikey); //- instantiate the class

NOTE

All methods are promise based.

Features

User - Get User Details

The GetUserDetails method calls the user details endpoint.

swipe.getUserDetails().then((res) => console.log(res));

Webhook - Create or Update Webhook

The updateWebhook method calls the update webhook endpoint. You can use the endpoint to create a new webhook, if you don't have one. Also it can be used to update an existing webhook.

const payload = {
    webhookUrl: "your-webhook-url",
}

swipe.updateWebhookUrl(payload).then((res) => console.log(res));

Data Plans - Get Available Data Plans

The Get Data Plans method calls the endpoint to get available data plans.

swipe.getDataPlans().then((res) => console.log(res));

Data Plans - Buy Data

The Buy Data Plan method calls the endpoint to get buy or subscibe to available data plans. It takes in few parameters as seen below.

const payload = {
    mobile_number: string, // the mobile number you desire to subscribe to.
    reference:     string, // the field is optional, if not passed it will be auto-created.
    plan:          string, // the plan ID to subscribe to e.g "252".
    network:       number, // the network ID to subscribe to e.g 1.
    ported_number: boolean // whether the phone number is a ported number.
}

swipe.buyDataPlan(payload).then((res) => console.log(res));

Transaction - Get All Data Transactions

The Get All Data Transaction method calls the endpoint to get data transactions made by a user.

It is a paginated endpoint which is optional, the parameters are as shown below. Also it returns an array of transactions.

To technially use it for pagination, the numnber of limit should be constant, while number of offset can increased by an constant interval e.g 0, 5, 10 etc to get more results.

const pagination = {
    limit: number, // the number of results to retrieve e.g 5. Default value if not provided is 10.
    offset: number // the number of results to skip e.g 0 or 5. Default value if not provided is 0.
}

swipe.getAllDataTransactions(pagination).then((res) => console.log(res));

Transaction - Get Data Transaction By Reference

The Get Data Transaction By Reference method calls the endpoint to get data transaction made by a reference.

The endpoint can be used to verify the data transactions. The endpoint takes a reference value as a parameter.

const reference = "swipe-reference-example";

swipe.getDataTransactionByReference(reference).then((res) => console.log(res));

Footnote

This project is an SDK for Swipe Telecommunication API services. Feel free to reach out to us for any complaint or enquiries.

This project is open sourced by the Swipe Telecommunication.

You can vist our homepage and our official Postman Documentation for more information and insights.

Thank you 🚀🚀🚀