Class: Wechat::ShakeAround::Shaking
- Inherits:
-
Object
- Object
- Wechat::ShakeAround::Shaking
- Extended by:
- Common
- Defined in:
- lib/wechat/shake_around/shaking.rb
Constant Summary
Constants included from Common
Class Method Summary collapse
Methods included from Common
normalize_date, normalize_device_id, normalize_page_ids
Class Method Details
.load(access_token, ticket) ⇒ Object
获取摇周边的设备及用户信息mp.weixin.qq.com/wiki/3/34904a5db3d0ec7bb5306335b8da1faf.html
Return hash format if success: {
data:
{
page_id: <PAGE_ID>,
openid: <OPEN_ID>,
poi_id: <POI_ID>,
beacon_info:
{
distance: <DISTANCE>,
uuid: <UUID>,
major: <MAJOR>,
minor: <MINOR>
}
},
errcode: 0,
errmsg: 'success.'
}
28 29 30 31 32 33 34 35 |
# File 'lib/wechat/shake_around/shaking.rb', line 28 def self.load(access_token, ticket) = ::JSONClient.new.post "https://api.weixin.qq.com/shakearound/user/getshakeinfo?access_token=#{access_token}", { ticket: ticket, need_poi: 1 } .body end |