public async Task <GetDocumentIdFromPermalinkResponse> GetDocumentIdFromPermalink(string permalink) { var request = CreateRequest("GetDocumentIdFromPermalink"); request.AddParameter("permalink", permalink); GetDocumentIdFromPermalinkResponse response = await this.ExecuteAsync <GetDocumentIdFromPermalinkResponse>(request).ConfigureAwait(false); return(response); }
public ActionResult Get(string permalink) { GetDocumentIdFromPermalinkResponse idResponse = _webServiceWrapper.GetDocumentIdFromPermalink(permalink).Result; if (idResponse != null) { GetDocumentByIdResponse documentResponse = _webServiceWrapper.GetDocumentById(idResponse.DocumentID).Result; if (documentResponse != null) { return(Rest(documentResponse)); } } return(Rest(null)); }