コード例 #1
0
        /// <summery>推送普通消息给全部的设备,限iOS系统使用
        /// <param name = "appId"> V3版本接口中对应用的标识 </param>
        /// <param name = "accessId"> V2版本接口中系统自动生成的标识 </param>
        /// <param name = "secretKey"> 用于API调用的秘钥 </param>
        /// <param name = "content"> 消息内容 </param>
        /// <param name = "environment"> 指定推送环境 </param>
        /// <returns> 推送结果描述 </returns>
        /// </summery>
        public async Task <string> PushAlliOS(string appId, long accessId, string secretKey, string content,
                                              PushEnvironmentofiOS environment)
        {
            var message = new MessageiOS();

            message.setAlert(content);

            var ret = await PushAllDevice(message, environment);

            return(ret);
        }
コード例 #2
0
        /// <summery>推送普通消息给全部的设备,限iOS系统使用
        /// <param name = "appID"> V3版本接口中对应用的标识 </param>
        /// <param name = "accessID"> V2版本接口中系统自动生成的标识 </param>
        /// <param name = "secretKey"> 用于API调用的秘钥 </param>
        /// <param name = "content"> 消息内容 </param>
        /// <param name = "environment"> 指定推送环境 </param>
        /// <returns> 推送结果描述 </returns>
        /// </summery>
        public static string pushAlliOS(string appID, long accessID, string secretKey, string content, PushEnvironmentofiOS environment)
        {
            MessageiOS message = new MessageiOS();

            message.setAlert(content);

            XingeApp xinge = new XingeApp(appID, accessID, secretKey);
            string   ret   = xinge.PushAllDevice(message, environment);

            return(ret);
        }
コード例 #3
0
        /// <summery>推送普通消息给绑定标签的设备,限iOS系统使用
        /// <param name = "appId"> V3版本接口中对应用的标识 </param>
        /// <param name = "accessId"> V2版本接口中系统自动生成的标识 </param>
        /// <param name = "secretKey"> 用于API调用的秘钥 </param>
        /// <param name = "content"> 消息内容 </param>
        /// <param name = "tag"> 接收设备标识绑定的标签 </param>
        /// <param name = "environment"> 指定推送环境 </param>
        /// <returns> 推送结果描述 </returns>
        /// </summery>
        public async Task <string> PushTagiOS(string appId, long accessId, string secretKey, string content, string tag,
                                              PushEnvironmentofiOS environment)
        {
            var message = new MessageiOS();

            message.setAlert(content);

            var tagList = new List <string> {
                tag
            };
            var ret = await PushTags(tagList, "OR", message, environment);

            return(ret);
        }
コード例 #4
0
        /// <summery>推送普通消息给绑定标签的设备,限iOS系统使用
        /// <param name = "appID"> V3版本接口中对应用的标识 </param>
        /// <param name = "accessID"> V2版本接口中系统自动生成的标识 </param>
        /// <param name = "secretKey"> 用于API调用的秘钥 </param>
        /// <param name = "content"> 消息内容 </param>
        /// <param name = "tag"> 接收设备标识绑定的标签 </param>
        /// <param name = "environment"> 指定推送环境 </param>
        /// <returns> 推送结果描述 </returns>
        /// </summery>
        public static string pushTagiOS(string appID, long accessID, string secretKey, string content, string tag, PushEnvironmentofiOS environment)
        {
            MessageiOS message = new MessageiOS();

            message.setAlert(content);

            XingeApp      xinge   = new XingeApp(appID, accessID, secretKey);
            List <string> tagList = new List <string>();

            tagList.Add(tag);
            string ret = xinge.PushTags(tagList, "OR", message, environment);

            return(ret);
        }