config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->post($this->generate_url . $config, $params); } /** * @param $id * @param $tagName * @return mixed * @throws \Exception */ public function tag_edit($id, $tagName) { $url['tag[id]'] = $id; $url['tag[name]'] = $tagName; $config = $this->config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->post($this->tag_edit . $config, $url); } /** * @param $id * @param $tagName * @return mixed * @throws \Exception */ public function tag_delete($id) { $url['tag[id]'] = $id; $config = $this->config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->post($this->tag_delete . $config, $url); } /** * @param $id * @param string[] $openid_list * @return mixed * @throws \Exception */ public function user_batch_add_tag($id, array $openid_list) { $url['tagid'] = $id; $url['openid_list'] = $openid_list; $config = $this->config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->post($this->user_batch_add_tag . $config, $url); } /** * @param $id * @param string[] $openid_list * @return mixed * @throws \Exception */ public function user_batch_remove_tag($id, array $openid_list) { $url['tagid'] = $id; $url['openid_list'] = $openid_list; $config = $this->config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->post($this->user_batch_remove_tag . $config, $url); } /** * @return mixed * @throws \Exception */ public function tagList() { $config = $this->config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->get($this->tag_lists . $config); } /** * @return mixed * @throws \Exception */ public function tag_fans_list() { $config = $this->config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->get($this->tag_fans_list . $config); } /** * @param $openid * @return mixed * @throws \Exception */ public function user_tag($openid) { $config = $this->config->getAccessToken(); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); return $this->request->post($this->user_tag . $config, [ 'openid' => $openid ]); } }