Пример #1
0
        private async Task<List<Article>> getArticles(Filter filter)
        {
            Article article = new Article();
            Task<List<Article>> task = article.readAPIAsync<Article>(filter);
                //"https://api.zalando.com/articles?brandFamily=nike&color=white&color=red&category=womens-shoes&page=1&pageSize=2");
            List<Article> list = await task;

            return list;
        }
Пример #2
0
 public async Task TestGetArticles()
 {
     Article article = new Article();
     Filter filter = new Filter();
     filter.setFilter("brandFamily=nike&color=white&color=red&category=womens-shoes&page=1&pageSize=2");
     Task<List<Article>> task = article.readAPIAsync<Article>(filter);
     List<Article>  list = await task;
     Assert.AreNotEqual(list.Count, 0);
 }
Пример #3
0
        private async void Search_Click(object sender, RoutedEventArgs e)
        {
            Article article = new Article();
            Task<List<Article>> task = article.readAPIAsync<Article>(filter);
            List<Article> list = await task;

            Articles = list;

            articlesGrid.ItemsSource = Articles;
        }
Пример #4
0
        private async Task<List<Article>> getArticles(string fullText)
        {
            Filter filter = new Filter().addGender(gender).addFullText(fullText).addPaging(currentPage);
            Article article = new Article();
            Task<List<Article>> task = article.readAPIAsync<Article>(filter);
            List<Article> list = await task;

            Articles = list;
            return list;
            
        }