Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

youzanyun-sdk-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youzanyun-sdk-nodejs - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

31

api-client.js

@@ -82,3 +82,3 @@ /**

// 网关Api调用
async callApi({ api, version, params, files, grant_id: kdtId }) {
async callApi({ api, version, params, files, grant_id: kdtId }, _axiosConfig) {
let token;

@@ -91,13 +91,16 @@ try {

}
const result = this._call({
api,
version,
params,
token,
files,
});
const result = this._call(
{
api,
version,
params,
token,
files,
},
_axiosConfig,
);
return result;
}
async _call({ api, version, token, params, files }) {
async _call({ api, version, token, params, files }, _axiosConfig) {
let url = '';

@@ -112,5 +115,5 @@ if (token) {

if (files && Object.keys(files).length > 0) {
response = await this._requestMultipart(url, params, files);
response = await this._requestMultipart(url, params, files, _axiosConfig);
} else {
response = await this._requestJson(url, params);
response = await this._requestJson(url, params, _axiosConfig);
}

@@ -124,4 +127,5 @@ if (response.data.success) {

async _requestJson(url, data) {
async _requestJson(url, data, _axiosConfig = {}) {
let response = await this._httpClient.request({
..._axiosConfig,
url,

@@ -137,3 +141,3 @@ method: 'post',

async _requestMultipart(url, data, files) {
async _requestMultipart(url, data, files, _axiosConfig = {}) {
let form = new FormData();

@@ -150,2 +154,3 @@ data = data || {};

let response = await this._httpClient.request({
..._axiosConfig,
url,

@@ -152,0 +157,0 @@ method: 'post',

{
"name": "youzanyun-sdk-nodejs",
"version": "1.6.0",
"version": "1.7.0",
"description": "有赞云 nodejs sdk",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,3 +27,3 @@ process.env.OPENSDK_CLIENTID = '434bff5f1b502f9668';

files: null,
grant_id: 53548965,
kdtId: 53548965,
});

@@ -30,0 +30,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc