1 | <?php |
||
29 | class POI extends AbstractAPI |
||
30 | { |
||
31 | const API_CREATE = 'http://api.weixin.qq.com/cgi-bin/poi/addpoi'; |
||
32 | const API_GET = 'http://api.weixin.qq.com/cgi-bin/poi/getpoi'; |
||
33 | const API_LIST = 'http://api.weixin.qq.com/cgi-bin/poi/getpoilist'; |
||
34 | const API_UPDATE = 'http://api.weixin.qq.com/cgi-bin/poi/updatepoi'; |
||
35 | const API_DELETE = 'http://api.weixin.qq.com/cgi-bin/poi/delpoi'; |
||
36 | const API_GET_CATEGORIES = 'http://api.weixin.qq.com/cgi-bin/poi/getwxcategory'; |
||
37 | |||
38 | /** |
||
39 | * Get POI supported categories. |
||
40 | * |
||
41 | * @return \EasyWeChat\Support\Collection |
||
42 | */ |
||
43 | 1 | public function getCategories() |
|
47 | |||
48 | /** |
||
49 | * Get POI by ID. |
||
50 | * |
||
51 | * @param int $poiId |
||
52 | * |
||
53 | * @return \EasyWeChat\Support\Collection |
||
54 | */ |
||
55 | 1 | public function get($poiId) |
|
59 | |||
60 | /** |
||
61 | * List POI. |
||
62 | * |
||
63 | * @param int $offset |
||
64 | * @param int $limit |
||
65 | * |
||
66 | * @return \EasyWeChat\Support\Collection |
||
67 | */ |
||
68 | 1 | public function lists($offset = 0, $limit = 10) |
|
77 | |||
78 | /** |
||
79 | * Create a POI. |
||
80 | * |
||
81 | * @param array $data |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | 1 | public function create(array $data) |
|
93 | |||
94 | /** |
||
95 | * Update a POI. |
||
96 | * |
||
97 | * @param int $poiId |
||
98 | * @param array $data |
||
99 | * |
||
100 | * @return bool |
||
101 | */ |
||
102 | 1 | public function update($poiId, array $data) |
|
112 | |||
113 | /** |
||
114 | * Delete a POI. |
||
115 | * |
||
116 | * @param int $poiId |
||
117 | * |
||
118 | * @return bool |
||
119 | */ |
||
120 | 1 | public function delete($poiId) |
|
126 | } |
||
127 |