예제 #1
0
        public ResponseWrapper validCodes(ValidPayload payload, string msg_id)
        {
            Preconditions.checkArgument(payload != null, "pushPayload should not be empty");
            payload.Check();
            String payloadJson = payload.ToJson(payload);

            return(validCodes(payloadJson, msg_id));
        }
예제 #2
0
 public string ToJson(ValidPayload code)
 {
     return JsonConvert.SerializeObject(code,
                     Newtonsoft.Json.Formatting.None,
                     new JsonSerializerSettings
                     {
                         NullValueHandling = NullValueHandling.Ignore
                     });
 }
예제 #3
0
 public string ToJson(ValidPayload code)
 {
     return(JsonConvert.SerializeObject(code,
                                        Newtonsoft.Json.Formatting.None,
                                        new JsonSerializerSettings
     {
         NullValueHandling = NullValueHandling.Ignore
     }));
 }
        public static void Main(string[] args)
        {
            Console.WriteLine("*****开始发送******");

            JSMSClient client = new JSMSClient(app_key, master_secret);

            // 验证 API
            // API文档地址 http://docs.jiguang.cn/jsms/server/rest_api_jsms/#api_2
            string msg_id = "227effab-b00c-4569-8021-220a036b7ae6";
            ValidPayload codes = new ValidPayload("121806");
            String codesjson = codes.ToJson(codes);
            Console.WriteLine(codesjson);
            client._SMSClient.validCodes(codes,msg_id);
            Console.ReadLine();
        }
예제 #5
0
 public ResponseWrapper validCodes(ValidPayload payload, string msg_id)
 {
     Preconditions.checkArgument(payload != null, "pushPayload should not be empty");
     payload.Check();
     String payloadJson = payload.ToJson(payload);
     return validCodes(payloadJson, msg_id);
 }