Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ziming authored and github-actions[bot] committed Feb 3, 2025
1 parent bc47342 commit bd55f8f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
20 changes: 16 additions & 4 deletions src/LaravelDocparser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
use Illuminate\Http\Client\Response;
use Illuminate\Support\Facades\Http;

final readonly class LaravelDocparser {

final readonly class LaravelDocparser
{
public static function make(): self
{
return new self();
return new self;
}

/**
* @see https://docparser.com/api/#list-document-parsers?ref=iavng
*
* @throws ConnectionException
*/
public function listDocumentParsers(): PromiseInterface|Response
Expand All @@ -29,6 +30,7 @@ public function listDocumentParsers(): PromiseInterface|Response

/**
* @see https://docparser.com/api/#list-parser-model-layouts?ref=iavng
*
* @throws ConnectionException
*/
public function listParserModelLayouts(string $parserId): PromiseInterface|Response
Expand All @@ -39,6 +41,7 @@ public function listParserModelLayouts(string $parserId): PromiseInterface|Respo

/**
* @see https://docparser.com/api/#import-documents?ref=iavng
*
* @throws ConnectionException
*/
public function uploadDocumentFromLocalPath(string $parserId, string $filePath, ?string $remoteId = null): PromiseInterface|Response
Expand All @@ -52,6 +55,7 @@ public function uploadDocumentFromLocalPath(string $parserId, string $filePath,

/**
* @see https://docparser.com/api/#import-documents?ref=iavng
*
* @throws ConnectionException
*/
public function uploadDocumentByContent(string $parserId, string $fileContent, ?string $fileName = null, ?string $remoteId = null): PromiseInterface|Response
Expand All @@ -66,6 +70,7 @@ public function uploadDocumentByContent(string $parserId, string $fileContent, ?

/**
* @see https://docparser.com/api/#import-documents?ref=iavng
*
* @throws ConnectionException
*/
public function fetchDocumentFromUrl(string $parserId, string $url, ?string $remoteId = null): PromiseInterface|Response
Expand All @@ -79,6 +84,7 @@ public function fetchDocumentFromUrl(string $parserId, string $url, ?string $rem

/**
* @see https://docparser.com/api/#document-status?ref=iavng
*
* @throws ConnectionException
*/
public function documentStatus(string $parserId, string $documentId): PromiseInterface|Response
Expand All @@ -89,6 +95,7 @@ public function documentStatus(string $parserId, string $documentId): PromiseInt

/**
* @see https://docparser.com/api/#get-data-of-one-document?ref=iavng
*
* @throws ConnectionException
*/
public function getDataOfOneDocument(string $parserId, string $documentId, ?string $format = null, ?bool $includeChildren = null): PromiseInterface|Response
Expand All @@ -102,6 +109,7 @@ public function getDataOfOneDocument(string $parserId, string $documentId, ?stri

/**
* @see https://docparser.com/api/#get-data-of-multiple-documents?ref=iavng
*
* @throws ConnectionException
*/
public function getDataOfMultipleDocuments(string $parserId, ?string $format = null, ?string $list = null, ?int $limit = null, ?CarbonInterface $date = null, ?string $remoteId = null, ?bool $includeProcessingQueue = null, ?string $sortBy = null, ?string $sortOrder = null): PromiseInterface|Response
Expand All @@ -121,6 +129,7 @@ public function getDataOfMultipleDocuments(string $parserId, ?string $format = n

/**
* @see https://docparser.com/api/#re-parse-data?ref=iavng
*
* @throws ConnectionException
*/
public function reparseData(string $parserId, array $documentIds): PromiseInterface|Response
Expand All @@ -133,6 +142,7 @@ public function reparseData(string $parserId, array $documentIds): PromiseInterf

/**
* @see https://docparser.com/api/#re-integrate-data?ref=iavng
*
* @throws ConnectionException
*/
public function reIntegrateData(string $parserId, array $documentIds): PromiseInterface|Response
Expand All @@ -145,6 +155,7 @@ public function reIntegrateData(string $parserId, array $documentIds): PromiseIn

/**
* @see https://docparser.com/api/#authentication?ref=iavng
*
* @throws ConnectionException
*/
public function pingV1Api(): PromiseInterface|Response
Expand All @@ -155,13 +166,14 @@ public function pingV1Api(): PromiseInterface|Response

/**
* May not work, just adding since v1 has a ping method
*
* @see https://docparser.com/api/#authentication?ref=iavng
*
* @throws ConnectionException
*/
public function pingV2Api(): PromiseInterface|Response
{
return Http::docparser()
->get('/v2/ping');
}

}
1 change: 0 additions & 1 deletion src/LaravelDocparserServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Support\Facades\Http;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Ziming\LaravelDocparser\Commands\LaravelDocparserCommand;

class LaravelDocparserServiceProvider extends PackageServiceProvider
{
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Ziming\LaravelDocparser\Tests;

use Illuminate\Database\Eloquent\Factories\Factory;
use Orchestra\Testbench\TestCase as Orchestra;
use Ziming\LaravelDocparser\LaravelDocparserServiceProvider;

Expand Down

0 comments on commit bd55f8f

Please sign in to comment.