@@ -122,19 +122,39 @@ $content = DocuWare::downloadDocument($fileCabinetId, $documentId);
122122
123123/**
124124 * Download multiple documents.
125+ *
126+ * Although there are no mentioned limits in the documentation,
127+ * it is not advisable to download more than 100 documents at once.
128+ *
129+ * Also note there is a default request timeout of 30 seconds.
125130 */
126131$content = DocuWare::downloadDocuments($fileCabinetId, $documentIds);
127132
133+ /**
134+ * Download a document thumbnail.
135+ */
136+ $content = DocuWare::downloadDocumentThumbnail($fileCabinetId, $documentId, $section, $page);
137+
128138/**
129139 * Update value of a indexed field.
130140 */
131- $value = DocuWare::updateDocumentValue($fileCabinetId, $documentId, $fieldName, $newValue);
141+ $value = DocuWare::updateDocumentValue($fileCabinetId, $documentId, $fieldName, $newValue, $forceDownload);
142+
143+ /**
144+ * Update multiple values of indexed fields.
145+ */
146+ $value = DocuWare::updateDocumentValue($fileCabinetId, $documentId, $values, $forceDownload);
132147
133148/**
134149 * Upload new document.
135150 */
136151$document = DocuWare::uploadDocument($fileCabinetId, $fileContent, $fileName);
137152
153+ /**
154+ * Get total document count.
155+ */
156+ $content = DocuWare::documentCount($fileCabinetId, $dialogId)
157+
138158/**
139159 * Upload new document with index values.
140160 */
@@ -489,6 +509,18 @@ Something is wrong during the URL making.
489509
490510---
491511
512+ - ` CodebarAg\DocuWare\Exceptions\UnableToUpdateFields `
513+
514+ No fields were supplied.
515+
516+ ---
517+
518+ - ` CodebarAg\DocuWare\Exceptions\UnableToGetDocumentCount `
519+
520+ Something is wrong with the response from getting the document count.
521+
522+ ---
523+
492524- ` Illuminate\Http\Client\RequestException `
493525
494526All other cases if the response is not successfully.
@@ -532,22 +564,22 @@ return [
532564 'cache_driver' => env('DOCUWARE_CACHE_DRIVER', env('CACHE_DRIVER', 'file')),
533565
534566 /*
535- |--------------------------------------------------------------------------
536- | Cookies
537- |--------------------------------------------------------------------------
538- | This variable is optional and only used if you want to set the request cookie manually.
539- |
540- */
567+ |--------------------------------------------------------------------------
568+ | Cookies
569+ |--------------------------------------------------------------------------
570+ | This variable is optional and only used if you want to set the request cookie manually.
571+ |
572+ */
541573
542574 'cookies' => env('DOCUWARE_COOKIES'),
543575
544576 /*
545- |--------------------------------------------------------------------------
546- | Requests timeout
547- |--------------------------------------------------------------------------
548- | This variable is optional and only used if you want to set the request timeout manually.
549- |
550- */
577+ |--------------------------------------------------------------------------
578+ | Requests timeout
579+ |--------------------------------------------------------------------------
580+ | This variable is optional and only used if you want to set the request timeout manually.
581+ |
582+ */
551583
552584 'timeout' => env('DOCUWARE_TIMEOUT', 30),
553585
@@ -595,11 +627,11 @@ return [
595627 'cookie_lifetime' => (int) env('DOCUWARE_COOKIE_LIFETIME', 525600),
596628
597629 /*
598- |--------------------------------------------------------------------------
599- | Configurations
600- |--------------------------------------------------------------------------
601- |
602- */
630+ |--------------------------------------------------------------------------
631+ | Configurations
632+ |--------------------------------------------------------------------------
633+ |
634+ */
603635 'configurations' => [
604636 'search' => [
605637 'operation' => 'And',
@@ -617,22 +649,26 @@ return [
617649 ],
618650
619651 /*
620- |--------------------------------------------------------------------------
621- | Tests
622- |--------------------------------------------------------------------------
623- |
624- */
652+ |--------------------------------------------------------------------------
653+ | Tests
654+ |--------------------------------------------------------------------------
655+ |
656+ */
625657 'tests' => [
626658 'file_cabinet_id' => env('DOCUWARE_TESTS_FILE_CABINET_ID'),
627659 'dialog_id' => env('DOCUWARE_TESTS_DIALOG_ID'),
628660 'basket_id' => env('DOCUWARE_TESTS_BASKET_ID'),
661+ 'section' => (int) env('DOCUWARE_TESTS_SECTION'),
629662 'organization_id' => env('DOCUWARE_TESTS_ORGANIZATION_ID'),
630663 'document_id' => (int) env('DOCUWARE_TESTS_DOCUMENT_ID'),
631664 'document_file_size_preview' => (int) env('DOCUWARE_TESTS_DOCUMENT_FILE_SIZE_PREVIEW'),
632665 'document_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENT_FILE_SIZE'),
633- 'document_ids' => json_decode(env('DOCUWARE_TESTS_DOCUMENTS_IDS')),
666+ 'document_count' => (int) env('DOCUWARE_TESTS_DOCUMENT_COUNT'),
667+ 'document_thumbnail_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENT_THUMBNAIL_FILE_SIZE'),
668+ 'document_ids' => json_decode(env('DOCUWARE_TESTS_DOCUMENTS_IDS', '[]')),
634669 'documents_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENTS_FILE_SIZE'),
635670 'field_name' => env('DOCUWARE_TESTS_FIELD_NAME'),
671+ 'field_name_2' => env('DOCUWARE_TESTS_FIELD_NAME_2'),
636672 ],
637673];
638674```
@@ -648,7 +684,6 @@ cp phpunit.xml.dist phpunit.xml
648684Modify environment variables in the phpunit.xml-file:
649685
650686``` xml
651-
652687<env name =" DOCUWARE_URL" value =" https://domain.docuware.cloud" />
653688<
env name =
" DOCUWARE_USERNAME" value =
" [email protected] " />
654689<env name =" DOCUWARE_PASSWORD" value =" password" />
@@ -659,11 +694,14 @@ Modify environment variables in the phpunit.xml-file:
659694<env name =" DOCUWARE_TESTS_FILE_CABINET_ID" value =" " />
660695<env name =" DOCUWARE_TESTS_DIALOG_ID" value =" " />
661696<env name =" DOCUWARE_TESTS_BASKET_ID" value =" " />
662- <env name =" DOCUWARE_TESTS_ORGANIZATION_ID " value =" " />
697+ <env name =" DOCUWARE_TESTS_SECTION " value =" " />
663698<env name =" DOCUWARE_TESTS_FIELD_NAME" value =" UUID" />
699+ <env name =" DOCUWARE_TESTS_FIELD_NAME_2" value =" DOCUMENT_LABEL" />
664700
665701<env name =" DOCUWARE_TESTS_DOCUMENT_FILE_SIZE_PREVIEW" value =" " />
666702<env name =" DOCUWARE_TESTS_DOCUMENT_FILE_SIZE" value =" " />
703+ <env name =" DOCUWARE_TESTS_DOCUMENT_COUNT" value =" " />
704+ <env name =" DOCUWARE_TESTS_DOCUMENT_THUMBNAIL_FILE_SIZE" value =" " />
667705<env name =" DOCUWARE_TESTS_DOCUMENTS_FILE_SIZE" value =" " />
668706<env name =" DOCUWARE_TESTS_DOCUMENT_ID" value =" " />
669707<env name =" DOCUWARE_TESTS_DOCUMENTS_IDS" value =" []" />
0 commit comments