All Projects → kuaidi100-api → .net Demo

kuaidi100-api / .net Demo

快递100,接口,API,快递100免费接口,快递查询接口,快递查询接口,快递100 api,快递100 api接口,快递100接口,快递查询api,快递查询api 免费,快递api,快递接口,接口,API,查询,快递查询,快递信息推送,实时快递查询,云打印,电子面单,商家寄件,C端寄件

Labels

Projects that are alternatives of or similar to .net Demo

Yett
🔐A small webpage library to control the execution of (third party) scripts
Stars: ✭ 615 (+2096.43%)
Mutual labels:  tracking
Jeelizweboji
JavaScript/WebGL real-time face tracking and expression detection library. Build your own emoticons animated in real time in the browser! SVG and THREE.js integration demos are provided.
Stars: ✭ 835 (+2882.14%)
Mutual labels:  tracking
Media Tracker
Self-hosted open source media-tracker for tv shows and movies. (React, Redux)
Stars: ✭ 21 (-25%)
Mutual labels:  tracking
Vpp
Video++, a C++14 high performance video and image processing library.
Stars: ✭ 655 (+2239.29%)
Mutual labels:  tracking
Trape
People tracker on the Internet: OSINT analysis and research tool by Jose Pino
Stars: ✭ 6,753 (+24017.86%)
Mutual labels:  tracking
Find Lf
Track the location of every Wi-Fi device (📱) in your house using Raspberry Pis and FIND
Stars: ✭ 893 (+3089.29%)
Mutual labels:  tracking
Siamfc Tf
SiamFC tracking in TensorFlow.
Stars: ✭ 566 (+1921.43%)
Mutual labels:  tracking
Indian Courier Api
API to track parcel from various Indian Logistics Providers
Stars: ✭ 26 (-7.14%)
Mutual labels:  tracking
Mailtrackerblocker
Email tracker, read receipt and spy pixel blocker plugin for macOS Apple Mail
Stars: ✭ 821 (+2832.14%)
Mutual labels:  tracking
Mixpanel Android
Official Mixpanel Android SDK
Stars: ✭ 907 (+3139.29%)
Mutual labels:  tracking
Map Matching
The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
Stars: ✭ 665 (+2275%)
Mutual labels:  tracking
Hblock
Improve your security and privacy by blocking ads, tracking and malware domains.
Stars: ✭ 724 (+2485.71%)
Mutual labels:  tracking
Umbraco Nexu
Umbraco package that let's you track internal links in Umbraco
Stars: ✭ 18 (-35.71%)
Mutual labels:  tracking
Siamdw
[CVPR'19 Oral] Deeper and Wider Siamese Networks for Real-Time Visual Tracking
Stars: ✭ 635 (+2167.86%)
Mutual labels:  tracking
Doc Hunt
Keep your documentation up to date by tracking changes in your source code
Stars: ✭ 24 (-14.29%)
Mutual labels:  tracking
Rack Tracker
Tracking made easy: Don’t fool around with adding tracking and analytics partials to your app and concentrate on the things that matter.
Stars: ✭ 601 (+2046.43%)
Mutual labels:  tracking
Pyamplitude
A Python connector for Amplitude Analytics
Stars: ✭ 16 (-42.86%)
Mutual labels:  tracking
Sro
Friendly Correios SRO API wrapper and command-line utility
Stars: ✭ 7 (-75%)
Mutual labels:  tracking
Norfair
Lightweight Python library for adding real-time 2D object tracking to any detector.
Stars: ✭ 933 (+3232.14%)
Mutual labels:  tracking
Parse Auditor
Audit module for Parse Platform
Stars: ✭ 19 (-32.14%)
Mutual labels:  tracking

.net Project

Introduce

.net-demo 是由快递100官方提供的c# sdk,方便调试使用。

.net-demo 集成了实时查询、订阅推送、智能判断、云打印相关、电子面单相关、短信等接口。

Features

  • 提供了快递100接口请求参数实体类、返回实体类。
  • 提供测试类调试。

Getting started

.net-demo使用和测试可参考test

# git clone https://github.com/kuaidi100-api/.net-demo.git

Use Junit Test

using System;
using Common;
using Common.Request;
using Common.Request.Subscribe;
using Utils;
using Newtonsoft.Json;
using Common.Request.Electronic.Image;
using Common.Request.Electronic.Html;
using Common.Request.Electronic;
using Common.Request.Electronic.Print;
using Common.Request.Sms;
using System.Collections;

class Program
{

    //快递100的基础账号信息,可以在这里获取 (需要填写完整才能测试)
    //https://poll.kuaidi100.com/manager/page/myinfo/enterprise
    private static KuaiDi100Config config = new KuaiDi100Config()
    {
        key = "",
        customer = "",
        secret = "",
        userid = "",
        siid = "",
        tid = "",
    };
    static void Main(string[] args)
    {
        //testQueryTrack();
        //testSubscribe();
        //testPrintImg();
        // testPrintHtml();
        // testPrintCloud();
        // testSendSms();
        testAutoNum();
    }

    /// <summary>
    /// 查询物流轨迹
    /// </summary>
    static void testQueryTrack()
    {
        var queryTrackParam = new QueryTrackParam(){
            com = "zhongtong",
            num = "75374767693697",
            phone = "15999998256"
        };
        
        QueryTrack.query(new QueryTrackReq()
        {
            customer = config.customer,
            sign = SignUtils.GetMD5(queryTrackParam.ToString() + config.key + config.customer),
            param =  queryTrackParam
        });
    }

    /// <summary>
    /// 订阅
    /// </summary>
    static void testSubscribe()
    {
        var subscribeParameters = new SubscribeParameters(){
            phone = "15999998256",
            resultv2 = "1",
            callbackurl = "http://www.xxxx.com"
        };

        var subscribeParam = new SubscribeParam(){
            company = "zhongtong",
            number = "75374767693697",
            key = config.key,
            parameters = subscribeParameters
        };
        
        Subscribe.query(new SubscribeReq()
        {
            schema = ApiInfoConstant.SUBSCRIBE_SCHEMA,
            param =  subscribeParam,
        });
    }

    /// <summary>
    /// 电子面单图片接口
    /// </summary>
    static void testPrintImg()
    {
        var printImgParam = new PrintImgParam(){
            kuaidicom = "zhaijisong",
            sendManName = "张三",
            sendManMobile = "15999998256",
            sendManPrintAddr = "广东省深圳市南山区科技南十二路",
            recManName = "李四",
            recManMobile = "15999998256",
            recManPrintAddr = "北京市海淀区xxx路",
            type = "10",
            tempid = "180c7c8f646742ca871a92c976392b05",
            count = "1",
            weight = "76",
            height = "130",
        };
        
        var timestamp = DateUtils.GetTimestamp();
        PrintImg.query(new PrintImgReq()
        {
            method = ApiInfoConstant.ELECTRONIC_ORDER_PIC_METHOD,
            key = config.key,
            t = timestamp,
            sign = SignUtils.GetMD5(printImgParam.ToString() + timestamp + config.key + config.secret),
            param = printImgParam,
        });
    }

    /// <summary>
    /// 电子面单html接口
    /// </summary>
    static void testPrintHtml()
    {
        var printHtmlParam = new PrintHtmlParam(){
            kuaidicom = "zhaijisong",
            sendMan = new ManInfo()
            {
                name = "张三",
                mobile = "15999998256",
                printAddr = "广东省深圳市南山区科技南十二路",
            },
            recMan = new ManInfo()
            {
                name = "李四",
                mobile = "15999998256",
                printAddr = "北京市海淀区xxx路",
            },
            count = "1",
            needTemplate = "1",   //如果需要返回电子面单,需要设置
        };
        
        var timestamp = DateUtils.GetTimestamp();
        PrintHtml.query(new PrintHtmlReq()
        {
            method = ApiInfoConstant.ELECTRONIC_ORDER_HTML_METHOD,
            key = config.key,
            t = timestamp,
            sign = SignUtils.GetMD5(printHtmlParam.ToString() + timestamp + config.key + config.secret),
            param = printHtmlParam,
        });
    }

    /// <summary>
    /// 电子面单打印接口
    /// </summary>
    static void testPrintCloud()
    {
        var printCloudParam = new PrintCloudParam(){
            kuaidicom = "zhaijisong",
            sendMan = new ManInfo()
            {
                name = "张三",
                mobile = "15999998256",
                printAddr = "广东省深圳市南山区科技南十二路",
            },
            recMan = new ManInfo()
            {
                name = "李四",
                mobile = "15999998256",
                printAddr = "北京市海淀区xxx路",
            },
            count = "1",
            siid = config.siid,
            tempid = "180c7c8f646742ca871a92c976392b05",
        };
        
        var timestamp = DateUtils.GetTimestamp();
        PrintCloud.query(new PrintCloudReq()
        {
            method = ApiInfoConstant.ELECTRONIC_ORDER_PRINT_METHOD,
            key = config.key,
            t = timestamp,
            sign = SignUtils.GetMD5(printCloudParam.ToString() + timestamp + config.key + config.secret),
            param = printCloudParam,
        });
    }

    /// <summary>
    /// 发送短信
    /// </summary>
    static void testSendSms()
    {
        var content = new Hashtable(); 
        content.Add("username","测试用户");

        SendSms.query(new SendSmsReq()
        {
            content = JsonConvert.SerializeObject(content),
            phone = "xxx",
            seller = "测试",
            userid = config.userid,
            tid = config.tid,
            sign = SignUtils.GetMD5(config.key + config.userid)
        });
    }
    
    /// <summary>
    /// 智能识别
    /// </summary>
    static void testAutoNum()
    {
        AutoNum.query("773039762404825",config.key);
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].