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

skinify-sdk

v0.0.4

Published

SDK for integrations with skinify.io

Downloads

6

Readme

Node module for skinsback.com API.

Installation

npm install skinsback-sdk

Usage

const API = require('skinsback-sdk').API;

or

import {API} from 'skinsback-sdk';

Constructor options

  • options[shop_id]: your shop_id key required
  • options[secret_key]: Your personal secret key for generate signature required. More about generate signature.
  • options[apiUrl]: url to API. Default: https://skinsback.com/api.php.

Example

import {API} from 'skinsback-sdk';

const options = {
    shop_id: 1490,
    secret_key: 'XCvlP45Y2dH2UmHhk'
}

const api = new API(options);

Api methods

All methods of api return a Promise.

api.getBalance() 
api.getCurrencies() 
const params = {
    starting: 15123132, /// Unix time starting
    ending: 15125832   /// Unix time ending
}
api.getOrders(params) 
const transaction_id = 65236
api.getOrderStatusByTransactionId(transaction_id) 
const order_id = 636
api.getOrderStatusByOrderId(order_id) 
const order_id = 636 ///Уникальный ID заказа в вашей системе
api.createOrder(order_id) 
api.serverStatus() 
api.getErrorCallbackList() 
const game = 'csgo' // Game types 'dota2' or 'csgo'. Default: 'csgo'
api.getMarketPriceList([game]) 
const name = 'FAMAS' // name of skin
const game = 'csgo' // Game types 'dota2' or 'csgo'. Default: 'csgo'
api.getMarketPriceList(name, [game]) 
const name = 'FAMAS' // name of skin
const game = 'csgo' // Game types 'dota2' or 'csgo'. Default: 'csgo'
api.buyItemByNameAndSendToUser(name, [game]) 
const params = {
    partner: string, // partner value from user trade URL
    token: string, //   token value from user trade URL
    max_price: number, // max skin cost for buying (as USD). Used as a cost limiter.
    name: string, // Skin name (market hash name)
    game: string // Game types 'dota2' or 'csgo'. Default: 'csgo'
}
api.buyItemByIdAndSendToUser(params) 
const buy_id = 12354322 /// buy_id from method buyItemByIdAndSendToUser or buyItemByNameAndSendToUser
api.getInfoAboutBoughtItem(buy_id) 
const params = {
    starting: 15123132, /// Unix time starting
    ending: 15125832   /// Unix time ending
}
api.getBoughtItemsHistory(params) 

WebSockets

Getting real-time changes for purchased skins.

Usage

const WebSockets = require('skinsback-sdk').WebSockets;

or

import {WebSockets} from 'skinsback-sdk';

Constructor options

  • options[shop_id]: your shop_id key required
  • options[secret_key]: Your personal secret key for generate signature. More about generate signature required.
  • options[socket_url]: SkinsBack socket url Show more ####Example
import {WebSockets} from 'skinsback-sdk';

const options = {
    shop_id: 1490,
    secret_key: 'XCvlP45Y2dH2UmHhkl1',
    socket_url: 'ws://185.71.65.202:7777'
}

const sockets = new WebSockets(options);

WebSockets methods

sockets.subscribe(data => console.log(data));
  • Calling a callback function when connecting to sockets
const cb = () => console.log('Connected')
sockets.connect(cb) 
  • Calling a callback function when disconnecting from sockets
const cb = () => console.log('Disconnected')
sockets.disconnect(cb)