Ejemplo n.º 1
0
        public async Task <DisqusResponse <IEnumerable <DisqusId> > > RemoveAsync(DisqusAccessToken accessToken,
                                                                                  DisqusThreadRemoveRequest request)
        {
            Collection <KeyValuePair <string, string> > parameters = Parameters
                                                                     .WithParameter("access_token", accessToken)
                                                                     .WithMultipleParameters(request.Parameters);

            return(await RequestProcessor
                   .ExecuteAsync <DisqusResponse <IEnumerable <DisqusId> > >(DisqusRequestMethod.Post,
                                                                             DisqusEndpoints.Threads.Remove, parameters)
                   .ConfigureAwait(false));
        }
Ejemplo n.º 2
0
        public async Task RemoveAsync_Test()
        {
            /* arrange */

            var request = DisqusThreadRemoveRequest
                          .New(DisqusThreadLookupType.Id, TestData.ThreadId);

            /* act */

            var response = await Disqus.Threads.RemoveAsync(DisqusAccessToken.Create(TestData.AccessToken), request).ConfigureAwait(false);

            /* assert */

            Assert.That(response.Code, Is.EqualTo(DisqusApiResponseCode.Success));
        }