com.foxinmy.weixin4j.mp.api
Class ShakeAroundApi

java.lang.Object
  extended by com.foxinmy.weixin4j.api.BaseApi
      extended by com.foxinmy.weixin4j.mp.api.MpApi
          extended by com.foxinmy.weixin4j.mp.api.ShakeAroundApi

public class ShakeAroundApi
extends MpApi

摇一摇周边

Since:
2016 -10-13 10:49:39
Author:
fengyapeng

Constructor Summary
ShakeAroundApi(TokenManager tokenManager)
          Instantiates a new Shake around api.
 
Method Summary
 DeviceAuditState deviceApply(Integer quantity, String applyReason, String comment)
          申请配置设备所需的UUID、Major、Minor。申请成功后返回批次ID,可用返回的批次ID通过“查询设备ID申请状态”接口查询目前申请的审核状态。 若单次申请的设备ID数量小于500个,系统会进行快速审核;若单次申请的设备ID数量大于等 500个 ,会在三个工作日内完成审核。 如果已审核通过,可用返回的批次ID通过“查询设备列表”接口拉取本次申请的设备ID。 通过接口申请的设备ID,需先配置页面,若未配置页面,则摇不出页面信息。
 DeviceAuditState deviceQueryApplyStatus(int applyId)
          查询设备ID申请的审核状态。若单次申请的设备ID数量小于等于500个, 系统会进行快速审核;若单次申请的设备ID数量大于500个,则在三个工作日内完成审核。
 Pagedata<Device> deviceSearchDevices(int pageSize)
          查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息。 按照分页信息查询设备
 Pagedata<Device> deviceSearchDevices(int lastDeviceId, int pageSize)
          查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 根据上次查询的最后的设备编号按照分页查询
 List<Device> deviceSearchDevices(List<Device> device)
          查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息。 查询指定设备的信息
 List<Device> deviceSearchDevicesByApplyId(Integer applyId)
          查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 查询 设备Id 下的所有的设备
 Pagedata<Device> deviceSearchDevicesByApplyId(Integer applyId, int pageSize)
          查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 分页获取设备id下的前多少设备
 Pagedata<Device> deviceSearchDevicesByApplyId(Integer applyId, int lastDeviceId, int pageSize)
          查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 分页获取设备id下的根据上次查询的最后的设备编号前多少设备
 ApiResult deviceUpdateComment(Device device, String comment)
          编辑设备的备注信息。可用设备ID或完整的UUID、Major、Minor指定设备,二者选其一。
 ShakeUserInfo getShakeUserInfo(String ticket)
          获取设备信息,包括UUID、major、minor,以及距离、openID等信息.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShakeAroundApi

public ShakeAroundApi(TokenManager tokenManager)
Instantiates a new Shake around api.

Parameters:
tokenManager - the token manager
Method Detail

deviceApply

public DeviceAuditState deviceApply(Integer quantity,
                                    String applyReason,
                                    String comment)
                             throws WeixinException
申请配置设备所需的UUID、Major、Minor。申请成功后返回批次ID,可用返回的批次ID通过“查询设备ID申请状态”接口查询目前申请的审核状态。 若单次申请的设备ID数量小于500个,系统会进行快速审核;若单次申请的设备ID数量大于等 500个 ,会在三个工作日内完成审核。 如果已审核通过,可用返回的批次ID通过“查询设备列表”接口拉取本次申请的设备ID。 通过接口申请的设备ID,需先配置页面,若未配置页面,则摇不出页面信息。

Parameters:
quantity - the quantity 申请的设备ID的数量,单次新增设备超过500个,需走人工审核流程
applyReason - the apply reason 申请理由,不超过100个汉字或200个英文字母
comment - the comment 备注,不超过15个汉字或30个英文字母
Returns:
the api result
Throws:
WeixinException - the weixin exception
Since:
2016 -10-12 21:21:47
See Also:

deviceQueryApplyStatus

public DeviceAuditState deviceQueryApplyStatus(int applyId)
                                        throws WeixinException
查询设备ID申请的审核状态。若单次申请的设备ID数量小于等于500个, 系统会进行快速审核;若单次申请的设备ID数量大于500个,则在三个工作日内完成审核。

Parameters:
applyId - the apply id 批次ID,申请设备ID时所返回的批次ID
Returns:
the device audit state
Throws:
WeixinException - the weixin exception
Since:
2016 -10-12 21:57:04
See Also:

deviceSearchDevices

public List<Device> deviceSearchDevices(List<Device> device)
                                 throws WeixinException
查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息。 查询指定设备的信息

Parameters:
device - the device
Returns:
the list
Throws:
WeixinException - the weixin exception
Since:
2016 -10-13 10:11:34

deviceSearchDevices

public Pagedata<Device> deviceSearchDevices(int pageSize)
                                     throws WeixinException
查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息。 按照分页信息查询设备

Returns:
the list
Throws:
WeixinException - the weixin exception
Since:
2016 -10-13 10:11:34

deviceSearchDevices

public Pagedata<Device> deviceSearchDevices(int lastDeviceId,
                                            int pageSize)
                                     throws WeixinException
查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 根据上次查询的最后的设备编号按照分页查询

Parameters:
lastDeviceId - the last device id
pageSize - the page size
Returns:
list pagedata
Throws:
WeixinException - the weixin exception
Since:
2016 -10-13 10:52:20

deviceSearchDevicesByApplyId

public List<Device> deviceSearchDevicesByApplyId(Integer applyId)
                                          throws WeixinException
查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 查询 设备Id 下的所有的设备

Parameters:
applyId - the apply id
Returns:
the list
Throws:
WeixinException
Since:
2016 -10-13 10:49:39

deviceSearchDevicesByApplyId

public Pagedata<Device> deviceSearchDevicesByApplyId(Integer applyId,
                                                     int pageSize)
                                              throws WeixinException
查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 分页获取设备id下的前多少设备

Parameters:
applyId - the apply id
Returns:
the list
Throws:
WeixinException
Since:
2016 -10-13 10:49:39

deviceSearchDevicesByApplyId

public Pagedata<Device> deviceSearchDevicesByApplyId(Integer applyId,
                                                     int lastDeviceId,
                                                     int pageSize)
                                              throws WeixinException
查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息 分页获取设备id下的根据上次查询的最后的设备编号前多少设备

Parameters:
applyId - the apply id
Returns:
the list
Throws:
WeixinException
Since:
2016 -10-13 10:49:39

deviceUpdateComment

public ApiResult deviceUpdateComment(Device device,
                                     String comment)
                              throws WeixinException
编辑设备的备注信息。可用设备ID或完整的UUID、Major、Minor指定设备,二者选其一。

Parameters:
device - the device
comment - the comment
Returns:
api result
Throws:
WeixinException
Since:
2016 -10-13 14:33:06

getShakeUserInfo

public ShakeUserInfo getShakeUserInfo(String ticket)
                               throws WeixinException
获取设备信息,包括UUID、major、minor,以及距离、openID等信息.

Parameters:
ticket - the ticket 摇周边业务的ticket,可在摇到的URL中得到,ticket生效时间为30分钟,每一次摇都会重新生成新的ticket
Returns:
shake user info
Throws:
WeixinException
Since:
2016 -10-21 19:34:38


Copyright © 2014–2017. All rights reserved.