cli tool
TheNorthMemory opened this issue · 1 comments
TheNorthMemory commented
命令行交互工具集
play the openapi requests over command line
TheNorthMemory commented
npm i yargs
./bin/cli.js --help
cli.js <command>
Commands:
cli.js crt The WeChatPay APIv3's Certificate Downloader [aliases: cert, certificateDownloader, downloader]
cli.js req <uri> Play the WeChatPay OpenAPI requests over command line [aliases: request, remote]
Options:
--version Show version number [boolean]
--help Show help [boolean]
./bin/cli.js crt --help
cli.js crt
The WeChatPay APIv3's Certificate Downloader
cert
-m, --mchid The merchant's ID, aka mchid. [string] [required]
-s, --serialno The serial number of the merchant's certificate aka serialno. [string] [required]
-f, --privatekey The path of the merchant's private key certificate aka privatekey. [string] [required]
-k, --key The secret key string of the merchant's APIv3 aka key. [string] [required]
-o, --output Path to output the downloaded WeChatPay's platform certificate(s) [string] [default: "/tmp"]
Options:
--version Show version number [boolean]
--help Show help [boolean]
./bin/cli.js req --help
cli.js req <uri>
Play the WeChatPay OpenAPI requests over command line
request <uri>
-c, --config The configuration [required]
-b, --binary Point out the response as `arraybuffer` [boolean]
-m, --method The request HTTP verb [default: "POST"]
-h, --headers Special request HTTP headers
-d, --data The request HTTP body
-p, --params The request HTTP query parameters
Options:
--version Show version number [boolean]
--help Show help [boolean]