skinsback.com API.
Node module forInstallation
npm install skinsback-sdk
Usage
const API = API;
or
;
Contructor options
options[shop_id]
: your shop_id key requiredoptions[secret_key]
: Your personalsecret key
for generate signature. More about generate signature.options[apiUrl]
: url to API. Default:https://skinsback.com/api.php
.
Example
; const options = shop_id: 1490 secret_key: 'XCvlP45Y2dH2UmHhkl1' const api = options;
Api methods
All methods of api return a Promise.
api
api
const params = starting: 15123132 /// Unix time starting ending: 15125832 /// Unix time endingapi
const transaction_id = 65236api
const order_id = 636api
const order_id = 636 ///Уникальный ID заказа в вашей системеapi
api
api
const game = 'csgo' // Game types 'dota2' or 'csgo'. Default: 'csgo'api
const name = 'FAMAS' // name of skinconst game = 'csgo' // Game types 'dota2' or 'csgo'. Default: 'csgo'api
const name = 'FAMAS' // name of skinconst game = 'csgo' // Game types 'dota2' or 'csgo'. Default: 'csgo'api
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
const buy_id = 12354322 /// buy_id from method buyItemByIdAndSendToUser or buyItemByNameAndSendToUserapi
const params = starting: 15123132 /// Unix time starting ending: 15125832 /// Unix time endingapi
WebScokets
Getting real-time changes for purchased skins.
Usage
const WebSockets = WebSockets;
or
;
Contructor options
options[shop_id]
: your shop_id key requiredoptions[secret_key]
: Your personalsecret key
for generate signature. More about generate signature.
Example
; const options = shop_id: 1490 secret_key: 'XCvlP45Y2dH2UmHhkl1' const sockets = options;
WebSockets methods
- Subscribing to socket events (Data arriving via sockets goes into the callback function argument as a parsed object)
sockets;
- Calling a callback function when connecting to sockets
const cb = consolesockets
- Calling a callback function when disconnecting from sockets
const cb = consolesockets