Beispiel #1
0
        public static async Task DeclineInvitation(ProjectModel project)
        {
            DictModel response = await Instance.ApiManager.DeclineInvitation(project.Id);

            Debug.WriteLine(response.ToString());
            App.User.RemovePotentialProject(project);
        }
Beispiel #2
0
        /********** CONTROL PANEL **********/

        public static async Task TryAutoLogin()
        {
            DictModel response = await Instance.ApiManager.AutoLogin();

            Debug.WriteLine("AutoLogin response: " + response.ToString());
            response.EnsureValid();

            User.UpdateWithJson(response.s("user"));
        }
Beispiel #3
0
        public static async Task Login(string email, string password)
        {
            DictModel response = await Instance.ApiManager.Login(email, password);

            Debug.WriteLine("Login response: " + response.ToString());
            response.EnsureValid();

            User.UpdateWithJson(response.s("user"));
            UseRootPage(new RootSessionPage());
        }
Beispiel #4
0
        public static async Task Register(string email, string password, string username)
        {
            DictModel response = await Instance.ApiManager.Register(email, password, username);

            Debug.WriteLine("Register response: " + response.ToString());
            response.EnsureValid();

            User.UpdateWithJson(response.s("user"));
            UseRootPage(new RootSessionPage());
        }