Skip to content

Instantly share code, notes, and snippets.

@newbdez33
Last active August 29, 2015 14:17
Show Gist options
  • Save newbdez33/fc8091d0ec95289cda0d to your computer and use it in GitHub Desktop.
Save newbdez33/fc8091d0ec95289cda0d to your computer and use it in GitHub Desktop.
追逐营销API

获得所有用户点信息

返回符合条件的所有用户JSON数据

  • URL

    /nodes

  • Method:

    POST

  • 参数

    Required:

    nodeId=[integer] //用户id
    token=[string] //用户登陆后获得token
    hash=[string] //验证请求合法性hash
    lng=[float] //地理信息
    lat=[float]

  • 成功返回:

    • Code: 200
      Content:
{ 
    "nodes" : [     
      {"nodeId":1, "lat":123.456, "lng":99.111, "hasKey":false},     
      {"nodeId":2, "lat":103.456, "lng":89.111, "hasKey":true} 
    ],     
    "error" : ""     
}    
  • 出错返回:

    • Code: 401 UNAUTHORIZED
      Content:
{ "error" : "需要登陆" }

OR

  • Code: 401 UNAUTHORIZED
    Content:
{ "error" : "活动还未开始" }
  • 调用示例:

    curl -X POST -d 'nodeId=1&token=a&hash=b&lng=123.456&lat=77.889 https://api-server/nodes

  • 注意:

    请使用https

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment