0.1.2 • Published 2 years ago

zwdd v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

zwdd

专有钉钉node-sdk

Install

npm install zwdd
# or
yarn add zwdd

Usage

import SDK from 'zwdd';

const sdk = new SDK({
    appKey: 'APP_KEY',
    appSecret: 'APP_SECRET',
});

API Interface

export default class ZWDD {
    constructor(options: Options);
    request<T = any>(api: string, init?: RequestInit): Promise<T>;
    getAccessToken(): Promise<string>;
    getAppUserInfo(authCode: string): Promise<UserInfo>;
    getJSApiTicket(): Promise<string>;
}

interface Options {
    appKey: string;
    appSecret: string;
    endpoint?: string;
    hostIp?: string; // server local ip
    hostMac?: string; // server local mac address 
}