Пример #1
0
        public static string Signup(SmsRequest request, string values)
        {
            var responseString = string.Empty;

            if (string.IsNullOrEmpty(values))
            {
                return(SMSResponseMessages.MissingValueMessage(request.From, "name", "game Awesome Person #5"));
            }

            return(RegisterPhoneForContest(request.From, values));
        }
Пример #2
0
 /// <summary>
 /// Registers an email with the SMS Bot
 /// </summary>
 /// <param name="request"></param>
 /// <param name="values"></param>
 /// <returns></returns>
 private static void DoEmailAction(SmsRequest request, string values)
 {
     if (values == string.Empty)
     {
         ResponseString = SMSResponseMessages.MissingValueMessage(request.From, "email", "email [email protected]");
     }
     else
     {
         var emailUpdated = UpdateEmail(request.From, values);
         if (emailUpdated)
         {
             ResponseString = SMSResponseMessages.CommandsMessage(request.From);
         }
         else
         {
             ResponseString = SMSResponseMessages.ErrorMessage(request.From);
         }
     }
 }
Пример #3
0
 /// <summary>
 /// Joins the SMS Bot
 /// </summary>
 /// <param name="request"></param>
 /// <param name="values"></param>
 /// <returns></returns>
 private static void DoJoinAction(SmsRequest request, string values)
 {
     if (values == string.Empty)
     {
         ResponseString = SMSResponseMessages.MissingValueMessage(request.From, "name", "join Jem Systems");
     }
     else
     {
         var registered = RegisterPhone(request.From, values);
         if (registered)
         {
             ResponseString = SMSResponseMessages.JustRegisteredMessage(request.From);
         }
         else
         {
             ResponseString = SMSResponseMessages.ErrorMessage(request.From);
         }
     }
 }