New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

bluemp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bluemp

This is the NodeJS sdk for BlueMP marketing open platform.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

BlueMP NodeJS SDK

Build Status

This is an unofficial NodeJS SDK implementation for BlueMP open platform.

This SDK is inspired by BlueMP official PHP SDK.

Currently, we only implemented three methods.

  • getAuthorizeURL
  • getAccessToken
  • getEnterpriseInfo

Installation

npm install bluemp --save

Examples

Get authorize URL

const bluemp = require('bluemp');

var mp_client = bluemp.createMPClient('app_xxxx', 'secret_xxxx');

var authorize_url = mp_client.getAuthorizeURL('http://www.example.com/bluemp/authorize', 'code');

Get access token

const bluemp = require('bluemp');

var mp_client = bluemp.createMPClient('app_xxxx', 'secret_xxx');

mp_client.getAccessToken('code', {
    code: 'xxxxx',
    redirect_uri: 'http://www.example.com/bluemp/authorize'
}, function(result) {
    if (!result.error) {
        console.log(result.access_token);
    } else {
        console.log(result.error);
    }
})

Get Enterprise Information

const bluemp = require('bluemp');

var mp_client = bluemp.createMPClient('app_xxxx', 'secret_xxx');

mp_client.getEnterpriseInfo('xxxxx', function(result) {
    console.log(result);
});

If you want detailed help information, please visit BlueMP

Keywords

bluemp

FAQs

Package last updated on 08 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts