1 | <?php |
||
28 | class POI extends AbstractAPI |
||
29 | { |
||
30 | const API_CREATE = 'http://api.weixin.qq.com/cgi-bin/poi/addpoi'; |
||
31 | const API_GET = 'http://api.weixin.qq.com/cgi-bin/poi/getpoi'; |
||
32 | const API_LIST = 'http://api.weixin.qq.com/cgi-bin/poi/getpoilist'; |
||
33 | const API_UPDATE = 'http://api.weixin.qq.com/cgi-bin/poi/updatepoi'; |
||
34 | const API_DELETE = 'http://api.weixin.qq.com/cgi-bin/poi/delpoi'; |
||
35 | |||
36 | /** |
||
37 | * Get POI by ID. |
||
38 | * |
||
39 | * @param int $poiId |
||
40 | * |
||
41 | * @return \EasyWeChat\Support\Collection |
||
42 | */ |
||
43 | 1 | public function get($poiId) |
|
47 | |||
48 | /** |
||
49 | * List POI. |
||
50 | * |
||
51 | * @param int $offset |
||
52 | * @param int $limit |
||
53 | * |
||
54 | * @return \EasyWeChat\Support\Collection |
||
55 | */ |
||
56 | 1 | public function lists($offset = 0, $limit = 10) |
|
65 | |||
66 | /** |
||
67 | * Create a POI. |
||
68 | * |
||
69 | * @param array $data |
||
70 | * |
||
71 | * @return bool |
||
72 | */ |
||
73 | 1 | public function create(array $data) |
|
81 | |||
82 | /** |
||
83 | * Update a POI. |
||
84 | * |
||
85 | * @param int $poiId |
||
86 | * @param array $data |
||
87 | * |
||
88 | * @return bool |
||
89 | */ |
||
90 | 1 | public function update($poiId, array $data) |
|
100 | |||
101 | /** |
||
102 | * Delete a POI. |
||
103 | * |
||
104 | * @param int $poiId |
||
105 | * |
||
106 | * @return bool |
||
107 | */ |
||
108 | 1 | public function delete($poiId) |
|
114 | } |
||
115 |