Exemplo n.º 1
0
        private async Task <ObservableCollection <TwitterCardViewModel> > GetTwitterFeed()
        {
            var viewModels = new ObservableCollection <TwitterCardViewModel> ();

            if (_twitterHelper.GetAccount() != null)
            {
                var response = await _twitterService.GetHomeFeed();

                if (await ProcessResponse(response, false))
                {
                    foreach (Tweet tweet in response.Result)
                    {
                        var viewModel = new TwitterCardViewModel(tweet);
                        viewModels.Add(viewModel);
                    }
                }
            }
            return(viewModels);
        }
Exemplo n.º 2
0
		private async Task<ObservableCollection<TwitterCardViewModel>> GetTwitterFeed ()
		{
			var viewModels = new ObservableCollection<TwitterCardViewModel> ();

			if(_twitterHelper.GetAccount() != null)
			{
				var response = await _twitterService.GetHomeFeed ();	

				if(await ProcessResponse(response, false))
				{
					foreach(Tweet tweet in response.Result)
					{
						var viewModel = new TwitterCardViewModel (tweet);
						viewModels.Add (viewModel);
					}
				}
			}
			return viewModels;
		}