public async Task <CursoredDisqusResponse <IEnumerable <DisqusPost> > > ListPopularAsync( DisqusAccessToken accessToken, DisqusPostListPopularRequest request) { Collection <KeyValuePair <string, string> > parameters = Parameters .WithMultipleParameters(request.Parameters) .WithOptionalParameter("access_token", accessToken); return(await RequestProcessor .ExecuteAsync <CursoredDisqusResponse <IEnumerable <DisqusPost> > >(DisqusRequestMethod.Get, DisqusEndpoints.Posts.ListPopular, parameters) .ConfigureAwait(false)); }
public async Task ListPopularAsync_Test() { /* arrange */ var request = DisqusPostListPopularRequest .New() .Forum(TestData.Forum) .Related(DisqusPostRelated.Forum | DisqusPostRelated.Thread); /* act */ var response = await Disqus.Posts.ListPopularAsync(request).ConfigureAwait(false); /* assert */ Assert.That(response, Is.Not.Null); Assert.That(response.Code, Is.EqualTo(DisqusApiResponseCode.Success)); Assert.That(response.Response, Is.Not.Empty); }
public async Task <CursoredDisqusResponse <IEnumerable <DisqusPost> > > ListPopularAsync( DisqusPostListPopularRequest request) { return(await ListPopularAsync(null, request).ConfigureAwait(false)); }