Senparc.Weixin.Work.AdvancedAPIs.KFApi.SendImageAsync C# (CSharp) Method

SendImageAsync() public static method

【异步方法】发送图片信息
public static SendImageAsync ( string accessToken, KF_User_Type senderType, string senderId, KF_User_Type receiverType, string receiverId, string mediaId, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
senderType KF_User_Type 发送人类型
senderId string 发送人标志
receiverType KF_User_Type 接收人类型
receiverId string 接收人标志
mediaId string 图片的mediaId
timeOut int 代理请求超时时间(毫秒)
return Task
        public static async Task<QyJsonResult> SendImageAsync(string accessToken, KF_User_Type senderType, string senderId, KF_User_Type receiverType,
            string receiverId, string mediaId, int timeOut = Config.TIME_OUT)
        {
            var data = new
            {
                sender = new
                {
                    type = senderType.ToString(),
                    id = senderId
                },
                receiver = new
                {
                    type = receiverType.ToString(),
                    id = receiverId
                },
                msgtype = "image",
                image = new
                {
                    media_id = mediaId
                }
            };
            return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<QyJsonResult>(accessToken, URL_FORMAT, data, CommonJsonSendType.POST, timeOut);
        }