//API51Tracking v3 api
namespace com;
class API51Tracking{
ctor(/*输入构造函数所需要的参数*/){
import string;
import web.rest.jsonLiteClient;
};
//
setkey = function(apikey){
var http = web.rest.jsonLiteClient();
http.addHeaders = {
"Content-Type":"application/json";
"Tracking-Api-Key":apikey;
};
this.api_url = "https://api.51Tracking.com/v3/trackings";
this.send = http.api(this.api_url+"/{...}");
//test
this.http = http;
};
//添加物流
create = function(txt_json){
/**
{
"tracking_number": "UB209300714LV",
"courier_code": "cainiao"
}
**/
return this.send.create(txt_json);
};
//查询物流
query = function(txt_json){
//{"tracking_numbers": "UB209300714LV"}
//用/get的方法,关键字get,用getGet,看提示
return this.send.getGet(txt_json);
};
type=me;
/*对象的所有成员必须用分号分隔*/
}
19
2024
04
51Tracking 快递接口 库
相关文章
« 下一篇
内存回收
更多评论>>
发表评论:
◎欢迎参与讨论
评论列表: