All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.foxinmy.weixin4j.qy.api.MenuApi Maven / Gradle / Ivy

There is a newer version: 1.10.2
Show newest version
package com.foxinmy.weixin4j.qy.api;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.deserializer.ExtraProcessor;
import com.alibaba.fastjson.parser.deserializer.ParseProcess;
import com.alibaba.fastjson.serializer.NameFilter;
import com.foxinmy.weixin4j.exception.WeixinException;
import com.foxinmy.weixin4j.http.weixin.ApiResult;
import com.foxinmy.weixin4j.http.weixin.WeixinResponse;
import com.foxinmy.weixin4j.model.Button;
import com.foxinmy.weixin4j.model.Token;
import com.foxinmy.weixin4j.token.TokenManager;
import com.foxinmy.weixin4j.type.ButtonType;

/**
 * 菜单相关API
 * 
 * @className MenuApi
 * @author jinyu([email protected])
 * @date 2014年9月25日
 * @since JDK 1.6
 * @see com.foxinmy.weixin4j.model.Button
 */
public class MenuApi extends QyApi {

	private final TokenManager tokenManager;

	public MenuApi(TokenManager tokenManager) {
		this.tokenManager = tokenManager;
	}

	/**
	 * 自定义菜单(管理员须拥有应用的管理权限 并且应用必须设置在回调模式)
	 * 
	 * @param agentid
	 *            应用ID
	 * 
	 * @param buttons
	 *            菜单列表
	 * @throws WeixinException
	 * @see 
	 *      创建自定义菜单
	 * @see com.foxinmy.weixin4j.model.Button
	 */
	public ApiResult createMenu(int agentid, List




© 2015 - 2025 Weber Informatics LLC | Privacy Policy