Exemple #1
0
        /// <summary>
        /// Attempts to sign the user up for the service.
        /// </summary>
        /// <returns>Whether or not the sign up was successful</returns>
        /// <param name="password">The password that the user wishes to set their account to</param>
        /// <param name="url">The URL of the server</param>
        public async Task <Boolean> doSignUp(string password, string url)
        {
            if (await Poster.PostObject(new { username = this.username, password = password }, url))
            {
                return(await doLogin(password, url));
            }

            return(false);
        }
Exemple #2
0
 /// <summary>
 /// Sends a group invite to a single user.
 /// </summary>
 /// <returns>Whether or not the invite was successfully sent</returns>
 /// <param name="username_to">The user that the invite is going to</param>
 /// <param name="this_user">The user that sent the invite</param>
 /// <param name="url"> http://52.91.212.179:8800/user/message/user/group/invite</param>
 public static async Task <Boolean> SendGroupInvite(string username_to, Credentials this_user, string url)
 {
     return(await Poster.PostObject(new { username_inviter = this_user.username, username_responder = username_to, token = this_user.token, message_text = "You have been invited to a group", message_code = 2 }, url));
 }
Exemple #3
0
 /// <summary>
 /// Sends a message to a single user, with a special utility code
 /// This particular call is not used, but could be useful in the future
 /// </summary>
 /// <returns>Whether or not the message was successful</returns>
 /// <param name="username_to">The user that the message is going to</param>
 /// <param name="this_user">The user that sent the message</param>
 /// <param name="url">http://52.91.212.179:8800/user/message</param>
 /// <param name="message_code">An integer code representing some event</param>
 public static async Task <Boolean> SendUtilSingleMessage(string username_to, Credentials this_user, string url, string message_code)
 {
     return(await Poster.PostObject(new { username_inviter = username_to, username_responder = this_user.username, token = this_user.token, message_code = message_code }, url));
 }
Exemple #4
0
 /// <summary>
 /// Sends a message to a group (if applicable)
 /// </summary>
 /// <returns>Whether or not the message was successful</returns>
 /// <param name="message">The message to send to the group</param>
 /// <param name="this_user">The user that sent the message</param>
 /// <param name="url"> http://52.91.212.179:8800/user/group/message</param>
 public static async Task <Boolean> SendGroupMessage(String message, Credentials this_user, string url)
 {
     return(await Poster.PostObject(new { username_from = this_user.username, token = this_user.token, message_code = 3, message_text = message }, url));
 }