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

secken-sdk

v1.0.0

Published

Nodejs module for Secken SDK

Downloads

9

Readme

Secken Private Cloud Server SDK For Nodejs

NPM version Build Status Downloads

中文文档

Description

Nodejs SDK for Secken-SDK Server

Website: https://www.yangcong.com

Wechat: yangcongAPP

Wechat Group: http://t.cn/RLGDwMJ

QQ: 475510094

Sina Weibo: http://weibo.com/secken

Business: 010-64772882 / [email protected]

Support: [email protected]

Documents: https://www.yangcong.com/help

Install && Usage

To install Secken.Private.ServerSdk, Import these packages

npm install secken-sdk
let SeckenSDK = require('secken-sdk');
let sdk = new SeckenSDK({
    app_id: 'appid',
    app_key: 'appkey',
});

all the functions in SDK will return a Promise object by node module Q

Release

1.0.0

  • Add unit testing

0.0.3

  • Update Readme

0.0.1

  • Add #getQrcode, #postAuthPush, #getResult, #checkAuthToken

Secken-SDK wrote by ES6, please using in Node 5.0 +

getQrcode (get a qrcode picture for auth)

sdk.getQrcode(options).then(data => {
    // data.qrcode_url
    // data.event_id   
});

params:

options = {
    auth_type: '',
    action_type: '',
    action_details: '',
    callback: ''
}

| status | description | |:----------:|:----------------------------:| | 200 | OK | | 400 | params error | | 403 | signature error | | 404 | no such app id | | 407 | time out | | 500 | system error | | 609 | ip address blocked |

getResult (get action result by event id)

accept 2 params: event_id and times

times will set 2000 by default, the function will get result in loop with delay time 2000 ms, by setting times to change the loop delay time, if times was false, function will run only one times

sdk.getQrcode(options).then(data => {
    return sdk.getResult(data.event_id, times);
}).then(data => {
    // success
}, error => {
    // error
}, notify => {
    // waiting for user auth, status 602
});

| status | description | |:----------:|:--------------------------------:| | 200 | OK | | 201 | event has been resolved | | 400 | params error | | 403 | signature error | | 404 | no such app id | | 407 | time out | | 500 | system error | | 601 | reject by user | | 602 | waiting for user auth | | 604 | no such event id | | 606 | callback is set | | 609 | ip address blocked |

postAuthPush (push a message to user for auth)

sdk.postAuthPush({
    uid: "",
}).then(data => {
    // success
}, error => {
    // failed
});

params:

options = {
    uid: "",   // required
    auth_type: "",
    action_type: "",
    action_details: ""
}

| status | description | |:----------:|:------------------------------:| | 200 | OK | | 400 | params error | | 403 | signature error | | 404 | no such app id | | 407 | time out | | 500 | system error | | 609 | ip address blocked |

checkAuthToken (check auth token)

sdk.checkAuthToken({
    auth_token: "1234567890123456789012345678901234567890",
}).then(data => {
    // success
}, error => {
    // failed
});

| status | desciption | |:----------:|:-----------------------------:| | 200 | OK | | 400 | params error | | 403 | signature error | | 404 | no such app id | | 407 | time out | | 500 | system error | | 608 | no such token | | 609 | ip address blocked |