Пример #1
0
        async void CheckConfig(LocalConfig config)
        {
            APIResponse response = await MattermostAPI.CheckSession(config);

            APIResponse <List <User> > users = await MattermostAPI.GetUsers();

            APIResponse <List <Channel> > channels = await MattermostAPI.GetChannels();

            APIResponse <Preferences> preferences = await MattermostAPI.GetPreferences();

            CurrentView = new MessageViewModel(this, users.Value, channels.Value);
        }
Пример #2
0
        async void CheckConfig(LocalConfig config)
        {
            APIResponse response = await MattermostAPI.CheckSession(config);

            if (!response.Success)
            {
                CurrentView = new LoginViewModel(this, config, response.Error);
            }
            else
            {
                APIResponse <List <User> > users = await MattermostAPI.GetUsers(config.TeamID);

                APIResponse <List <Channel> > channels = await MattermostAPI.GetChannels(config.TeamID);

                APIResponse <Preferences> preferences = await MattermostAPI.GetPreferences();

                CurrentView = new MessageViewModel(this, users.Value, channels.Value);
            }
        }