wechat-shake_around 0.7 → 0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/wechat/shake_around.rb +4 -0
- data/lib/wechat/shake_around/beacon_poi_relation.rb +28 -0
- data/lib/wechat/shake_around/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dc3f613987fad317ff5364ab73cf17a30d38d81
|
4
|
+
data.tar.gz: 6dcb7d96aded2a179907d9321d389239b3b03231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f577e33cd8c61dd5b65fa6ebe81d1c2b6b59895fda18e8f900cb7561c760ec1795b96bf0180a435cc824190f60285321eacdbcd5064cf89dc0804609c85eaa8
|
7
|
+
data.tar.gz: cfde83ebc7910a1cb5acfefa2c302d225dcf26c3ac7812718f3d35fb93faa74ad3b9e41f0f95aad9a207b4211318248a069a26cd98ce9173b65389c60fdae8c6
|
data/CHANGELOG.md
CHANGED
data/lib/wechat/shake_around.rb
CHANGED
@@ -20,6 +20,10 @@ require 'wechat/shake_around/device_group_relation'
|
|
20
20
|
require 'wechat/shake_around/device_report'
|
21
21
|
require 'wechat/shake_around/device_daily_report'
|
22
22
|
|
23
|
+
require 'wechat/shake_around/apply'
|
24
|
+
|
25
|
+
require 'wechat/shake_around/beacon_poi_relation'
|
26
|
+
|
23
27
|
module Wechat
|
24
28
|
module ShakeAround
|
25
29
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'jsonclient'
|
2
|
+
|
3
|
+
class Wechat::ShakeAround::BeaconPoiRelation
|
4
|
+
|
5
|
+
extend ::Wechat::ShakeAround::Common
|
6
|
+
|
7
|
+
# 配置设备与门店的关联关系
|
8
|
+
# http://mp.weixin.qq.com/wiki/15/b9e012f917e3484b7ed02771156411f3.html#.E9.85.8D.E7.BD.AE.E8.AE.BE.E5.A4.87.E4.B8.8E.E9.97.A8.E5.BA.97.E7.9A.84.E5.85.B3.E8.81.94.E5.85.B3.E7.B3.BB
|
9
|
+
#
|
10
|
+
# Return hash format if success:
|
11
|
+
# {
|
12
|
+
# data: {},
|
13
|
+
# errcode: 0,
|
14
|
+
# errmsg: 'success.'
|
15
|
+
# }
|
16
|
+
#
|
17
|
+
# device_id is an integer or a hash like { uuid: <UUID>, major: <MAJOR>, minor: <MINOR> }.
|
18
|
+
def self.create(access_token, device_id, poi_id)
|
19
|
+
device_identifier = self.normalize_device_id device_id
|
20
|
+
message = ::JSONClient.new.post "https://api.weixin.qq.com/shakearound/device/bindlocation?access_token=#{access_token}",
|
21
|
+
{
|
22
|
+
device_identifier: device_identifier,
|
23
|
+
poi_id: poi_id.to_i
|
24
|
+
}
|
25
|
+
message.body
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wechat-shake_around
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/wechat/shake_around/apply.rb
|
91
91
|
- lib/wechat/shake_around/beacon.rb
|
92
92
|
- lib/wechat/shake_around/beacon_page_relation.rb
|
93
|
+
- lib/wechat/shake_around/beacon_poi_relation.rb
|
93
94
|
- lib/wechat/shake_around/common.rb
|
94
95
|
- lib/wechat/shake_around/device_daily_report.rb
|
95
96
|
- lib/wechat/shake_around/device_group_relation.rb
|