Example #1
0
        public async Task <List <Models.Post> > GetRecentPosts()
        {
            var postsResponse = await _client.GetPosts();

            if (postsResponse.items != null)
            {
                return(MapPosts(postsResponse.items));
            }
            return(null);
        }
Example #2
0
        public async Task <IActionResult> Get()
        {
            var posts = await _postClient.GetPosts();

            return(Ok(posts));
        }
Example #3
0
        public async Task <Posts> GetAllPosts()
        {
            posts = await _postClient.GetPosts();

            return(posts);
        }