码迷,mamicode.com
首页 > Windows程序 > 详细

API index

时间:2016-05-01 20:30:56      阅读:354      评论:0      收藏:0      [点我收藏+]

标签:

The Real API prefix please refer to jones.z (QQ: 2810898115).

 

[枚举打印, enum value print]:

  http://www.cnblogs.com/jwiter/p/5451043.html

 

----------------------------------------------------------------------------------- 

Login

   URL:

    http://localhost:2448/api/ashx/service.ashx?action=login&loginname=zhazha&loginPwd=8888

    POST / GET

    Remark:

    loginname & loginPwd is essential;

           will get a token after correct login;

           the token will expire in 24 Hours.

      通过用户名、密码登录,
      登录取TOKEN

     API Response sample:

技术分享
{
    "data": {
        "Approved": false,
        "CompanyName": "宁波有为科技有限公司",
        "CreatedStamp": "/Date(1462080096046+0800)/",
        "Email": "633@ss.com",
        "IdNo": "52623",
        "Key": "1aff546e-c460-446f-8139-1c676afbf46d",
        "LoginName": "zhazha",
        "Password": null,
        "RealName": "牛二",
        "Token": "bf8eadb2-a42e-4d8b-9a4d-0b69de8544ef"
    },
    "msg": "登录成功",
    "responseCode": {
        "msgCode": 200,
        "msgDetail": "OK"
    },
    "serverTime": "2016-05-01 13:21:36",
    "success": true
}
response of Login

     

getDictionarys

   

      1) 取父级

  URL:

     http://localhost:2448/api/ashx/service.ashx?action=getDictionarys&token=4484E69D-8B6B-4F2E-89B6-8106B5B4A198

 

  POST / GET

  Response data sample:

  

技术分享
{
    "data": {
        "List": [
            {
                "CreatedStamp": "/Date(1462074405971+0800)/",
                "Key": "03e98553-d65b-485b-8c14-1e13ee8e2793",
                "Name": "空调品牌",
                "ParentKey": null,
                "Tag": "AirConditionBrand"
            },
            {
                "CreatedStamp": "/Date(1462074405971+0800)/",
                "Key": "fbbb640d-9ce0-46d6-bf2b-7d9d548fc4a4",
                "Name": "房屋类型",
                "ParentKey": null,
                "Tag": "HouseType"
            },
            {
                "CreatedStamp": "/Date(1462074405971+0800)/",
                "Key": "811aa0eb-4016-4aa8-bec9-db43102f08e6",
                "Name": "房间类型",
                "ParentKey": null,
                "Tag": "RoomType"
            }
        ]
    },
    "msg": "success",
    "responseCode": {
        "msgCode": 200,
        "msgDetail": "OK"
    },
    "serverTime": "2016-05-01 11:46:45",
    "success": true
}
  
response of get dictionarys

 

      2) 取子级

  

  URL:   

 
  POST / GET
  
  Response data sample:
  
技术分享
 {
    "data": {
        "List": [
            {
                "CreatedStamp": "/Date(1462073970333+0800)/",
                "Key": "fbcddf58-954e-4249-9b95-4e94d3efa589",
                "Name": "金立",
                "ParentKey": "03e98553-d65b-485b-8c14-1e13ee8e2793",
                "Tag": null
            },
            {
                "CreatedStamp": "/Date(1462073970334+0800)/",
                "Key": "be1e3057-7fae-4064-9fdd-ebf97264e78e",
                "Name": "格力",
                "ParentKey": "03e98553-d65b-485b-8c14-1e13ee8e2793",
                "Tag": null
            }
        ]
    },
    "msg": "success",
    "responseCode": {
        "msgCode": 200,
        "msgDetail": "OK"
    },
    "serverTime": "2016-05-01 11:39:32",
    "success": true
}
response of get dictionary -- sub nodes

 

    3) 没有授权的异常情况

   URL:

     response data sample:

   

技术分享
 {
    "data": null,
    "msg": null,
    "responseCode": {
        "msgCode": 401,
        "msgDetail": "Unauthorized"
    },
    "serverTime": "2016-05-01 12:52:45",
    "success": false
}
unauthorized case of response

 

 

(to be added.)

 

(the end)

  

  

  

 

API index

标签:

原文地址:http://www.cnblogs.com/jwiter/p/5450978.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!