群发语音消息给指定人

@param openIds
@param voice
@return
487792
public long voice(List<String> openIds, String voice) {
		return send(new Filter(false, null), openIds, "voice", voice);
	}
1248409
public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, String lang, URI uri) {
        HttpPost httpPost = new HttpPost(BASE_URI + "/cgi-bin/media/voice/addvoicetorecofortext");
        CloseableHttpClient tempHttpClient = HttpClients.createDefault();
        try {
            HttpEntity entity = tempHttpClient.execute(RequestBuilder.get().setUri(uri).build()).getEntity();
            HttpEntity reqEntity = MultipartEntityBuilder.create()
                    .addBinaryBody("media", EntityUtils.toByteArray(entity), ContentType.get(entity), "temp." + MediaType.voice_mp3.fileSuffix())
                    .addTextBody(PARAM_ACCESS_TOKEN, API.accessToken(accessToken))
                    .addTextBody("format", MediaType.voice_mp3.fileSuffix())
                    .addTextBody("voice_id", voiceId)
                    .addTextBody("lang", lang == null || lang.isEmpty() ? "zh_CN" : lang)
                    .build();
            httpPost.setEntity(reqEntity);

            return LocalHttpClient.executeJsonResult(httpPost, BaseResult.class);
        } catch (UnsupportedCharsetException | ParseException | IOException e) {
            logger.error("", e);
            throw new RuntimeException(e);
        } finally {
            try {
                tempHttpClient.close();
            } catch (IOException e) {
                logger.error("", e);
            }
        }
    }
134802
public ServerVoiceChannel getOrCreateServerVoiceChannel(JsonNode data) {
        long id = Long.parseLong(data.get("id").asText());
        ChannelType type = ChannelType.fromId(data.get("type").asInt());
        synchronized (this) {
            if (type == ChannelType.SERVER_VOICE_CHANNEL) {
                return getVoiceChannelById(id).orElseGet(() -> new ServerVoiceChannelImpl(api, this, data));
            }
        }
        // Invalid channel type
        return null;
    }
931100
def channels_voice_phone_number_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/channels/voice/phone_numbers/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
688121
protected void openNewDialog(String id) {

        CmsBasicDialog dialog = null;
        String caption = "";

        if (id.equals(ID_GROUP)) {
            dialog = new CmsGroupEditDialog(m_cms, m_window, m_ou, m_app);
            caption = CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_GROUP_0);
        }
        if (id.equals(ID_OU)) {
            dialog = new CmsOUEditDialog(m_cms, m_window, m_ou, m_app);
            caption = CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_OU_0);

        }
        if (id.equals(ID_USER)) {
            dialog = new CmsUserEditDialog(m_cms, m_window, m_ou, m_app);
            caption = CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_USER_0);
        }

        if (dialog != null) {
            m_window.setContent(dialog);
            m_window.setCaption(caption);
            m_window.center();
        }
    }
889372
public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, URI uri) {
        return addvoicetorecofortext(accessToken, voiceId, null, uri);
    }
1302994
public void move(List<String> openIds, int group) {
        String url = WxEndpoint.get("url.group.user.moves");
        Map<String, Object> request = new HashMap<>();
        request.put("openid_list", openIds);
        request.put("to_groupid", group);

        String json = JsonMapper.defaultMapper().toJson(request);
        logger.debug("move users group: {}", json);
        wxClient.post(url, json);
    }
802781
public static GetblacklistResult tagsMembersGetblacklist(String access_token,String begin_openid){
		String json = String.format("{\"begin_openid\":\"%s\"}",begin_openid == null?"":begin_openid);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
										.setHeader(jsonHeader)
										.setUri(BASE_URI+"/cgi-bin/tags/members/getblacklist")
										.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
										.setEntity(new StringEntity(json,Charset.forName("utf-8")))
										.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,GetblacklistResult.class);
	}
1094309
public static UserInfoList userInfoBatchget(String access_token,String lang,List<String> openids,int emoji){
		StringBuilder sb = new StringBuilder();
		sb.append("{\"user_list\": [");
		for(int i = 0;i < openids.size();i++){
			sb.append("{")
			  .append("\"openid\": \"").append(openids.get(i)).append("\",")
			  .append("\"lang\": \"").append(lang).append("\"")
			  .append("}").append(i==openids.size()-1?"":",");
		}
		sb.append("]}");
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(jsonHeader)
				.setUri(BASE_URI+"/cgi-bin/user/info/batchget")
				.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
				.setEntity(new StringEntity(sb.toString(), Charset.forName("utf-8")))
				.build();
		UserInfoList userInfoList = LocalHttpClient.executeJsonResult(httpUriRequest,UserInfoList.class);
		if(emoji != 0 && userInfoList != null && userInfoList.getUser_info_list() != null){
			for(User user : userInfoList.getUser_info_list()){
				if(user.getNickname() != null){
					user.setNickname_emoji(EmojiUtil.parse(user.getNickname(), emoji));
				}
			}
		}
		return userInfoList;
	}
567813
public void setOpenIDConnectProviderList(java.util.Collection<OpenIDConnectProviderListEntry> openIDConnectProviderList) {
        if (openIDConnectProviderList == null) {
            this.openIDConnectProviderList = null;
            return;
        }

        this.openIDConnectProviderList = new com.amazonaws.internal.SdkInternalList<OpenIDConnectProviderListEntry>(openIDConnectProviderList);
    }
45320
public function getBatchUserInfo(array $openids, $lang = 'zh_CN')
    {
        $url = 'https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token=ACCESS_TOKEN';
        $data = ['user_list' => []];
        foreach ($openids as $openid) {
            $data['user_list'][] = ['openid' => $openid, 'lang' => $lang];
        }
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, $data);
    }
1192506
public List<Integer> getUserTags(String openId) {
        String url = WxEndpoint.get("url.tag.user.gettag");
        Map<String, Object> map = new HashMap<>();
        map.put("openid", openId);
        String response = wxClient.post(url, JsonMapper.nonEmptyMapper().toJson(map));
        TagIdsWrapper tagIdsWrapper = JsonMapper.defaultMapper().fromJson(response, TagIdsWrapper.class);
        return tagIdsWrapper.getList();
    }
400727
public static UniversalIdStrMessage newInstance(String id, byte[] content) {
        UniversalIdStrMessage msg = newInstance(content);
        msg.setId(id);
        return msg;
    }
1332784
public long voice(int group, String voice) {
		return send(new Filter(false, String.valueOf(group)), null, "voice", voice);
	}
746332
public VoiceCallResponse viewVoiceCall(final String id) throws NotFoundException, GeneralException, UnauthorizedException {
        if (id == null) {
            throw new IllegalArgumentException("Voice Message ID must be specified.");
        }

        String url = String.format("%s%s", VOICE_CALLS_BASE_URL, VOICECALLSPATH);
        return messageBirdService.requestByID(url, id, VoiceCallResponse.class);
    }
121927
public static QueryrecoresultfortextResult queryrecoresultfortext(String accessToken, String voiceId, String lang) {
        HttpUriRequest httpUriRequest = RequestBuilder.post()
                .setUri(BASE_URI + "/cgi-bin/media/voice/queryrecoresultfortext")
                .addParameter(PARAM_ACCESS_TOKEN, API.accessToken(accessToken))
                .addParameter("voice_id", voiceId)
                .addParameter("lang", lang == null || lang.isEmpty() ? "zh_CN" : lang)
                .build();

        return LocalHttpClient.executeJsonResult(httpUriRequest,
                QueryrecoresultfortextResult.class);
    }
381934
public function getUserBatchInfo(array $openids, $lang = 'zh_CN')
    {
        if (!$this->access_token && !$this->getAccessToken()) {
            return false;
        }
        $data = array('user_list' => array());
        foreach (array_unique($openids) as $openid) {
            $data['user_list'][] = array('openid' => $openid, 'lang' => $lang);
        }
        $result = Tools::httpPost(self::API_URL_PREFIX . self::USER_BATCH_INFO_URL . "access_token={$this->access_token}", Tools::json_encode($data));
        if ($result) {
            $json = json_decode($result, true);
            if (empty($json) || !empty($json['errcode']) || !isset($json['user_info_list'])) {
                $this->errCode = isset($json['errcode']) ? $json['errcode'] : '505';
                $this->errMsg = isset($json['errmsg']) ? $json['errmsg'] : '无法解析接口返回内容！';
                return $this->checkRetry(__FUNCTION__, func_get_args());
            }
            return $json['user_info_list'];
        }
        return false;
    }