Ejemplo n.º 1
0
 public DocumentSearchResponse SearchDocuments(string xAuthToken, SearchDocumentsRequestData requestData)
 {
     _httpHelper.AddHeader("X-Auth-Token", xAuthToken);
     return(_httpHelper.Post <SearchDocumentsRequestData, DocumentSearchResponse>(
                $"api/v2/customers/{requestData.CustomerId}/libraries/{requestData.LibraryName}/documents/search",
                requestData));
 }
Ejemplo n.º 2
0
        public ActionResult SearchDocument([FromHeader] string xAuthToken, [FromBody] SearchDocumentsRequestData requestData)
        {
            try
            {
                var documents = _documentsService.SearchDocuments(xAuthToken, requestData);

                if (documents == null)
                {
                    return(NoContent());
                }

                return(Ok(documents.Data));
            }
            catch (Exception exc)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }