public async Task GetContextAsync_Test() { /* arrange */ var request = DisqusPostGetContextRequest .New(1) .Depth(4); /* act */ var response = await Disqus.Posts.GetContextAsync(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 <DisqusResponse <IEnumerable <DisqusPost> > > GetContextAsync(DisqusPostGetContextRequest request) { return(await GetContextAsync(null, request).ConfigureAwait(false)); }
public async Task <DisqusResponse <IEnumerable <DisqusPost> > > GetContextAsync(DisqusAccessToken accessToken, DisqusPostGetContextRequest request) { Collection <KeyValuePair <string, string> > parameters = Parameters .WithMultipleParameters(request.Parameters) .WithOptionalParameter("access_token", accessToken); return(await RequestProcessor .ExecuteAsync <DisqusResponse <IEnumerable <DisqusPost> > >(DisqusRequestMethod.Get, DisqusEndpoints.Posts.GetContext, parameters) .ConfigureAwait(false)); }