public ActionResult GetLibraryDocuments([FromHeader] string xAuthToken, string customerId, string libraryName) { var requestData = new GetLibraryDocumentsRequestData() { CustomerId = customerId, LibraryName = libraryName }; try { var foldersResult = _documentsService.GetLibraryDocuments(xAuthToken, requestData); if (foldersResult == null) { return(NoContent()); } return(Ok(foldersResult.Data.Results)); } catch (Exception exc) { return(StatusCode(StatusCodes.Status500InternalServerError)); } }
public GetLibraryDocumentsResponseData GetLibraryDocuments(string xAuthToken, GetLibraryDocumentsRequestData requestData) { _httpHelper.AddHeader("X-Auth-Token", xAuthToken); return(_httpHelper.Get <GetLibraryDocumentsResponseData>( $"api/v2/customers/{requestData.CustomerId}/libraries/{requestData.LibraryName}/documents")); }