Skip to content

Commit 3a18c70

Browse files
chore: add additional php doc tags
1 parent 77b2f76 commit 3a18c70

27 files changed

+124
-15
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
*.swo
2-
*.swp
1+
composer.lock
2+
docs/
33
.idea/
44
.php-cs-fixer.cache
55
.php-cs-fixer.php
6-
.phpdoc/
76
.phpunit.cache
8-
composer.lock
97
phpunit.xml
108
playground/
9+
*.swo
10+
*.swp
1111
vendor/

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"symfony/http-client": "^7"
4545
},
4646
"scripts": {
47+
"build:docs": "curl --etag-save ./vendor/ag.etags --etag-compare ./vendor/ag.etags --create-dirs --remote-name --output-dir ./vendor/bin --no-progress-meter -- https://github.com/ApiGen/ApiGen/releases/latest/download/apigen.phar && php ./vendor/bin/apigen.phar --output docs -- src",
4748
"lint": "./scripts/lint",
4849
"test": "./scripts/test"
4950
}

src/Client.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,49 @@ class Client extends BaseClient
1919
{
2020
public string $apiKey;
2121

22+
/**
23+
* @api
24+
*/
2225
public SmartscraperService $smartscraper;
2326

27+
/**
28+
* @api
29+
*/
2430
public MarkdownifyService $markdownify;
2531

32+
/**
33+
* @api
34+
*/
2635
public SearchscraperService $searchscraper;
2736

37+
/**
38+
* @api
39+
*/
2840
public GenerateSchemaService $generateSchema;
2941

42+
/**
43+
* @api
44+
*/
3045
public CrawlService $crawl;
3146

47+
/**
48+
* @api
49+
*/
3250
public CreditsService $credits;
3351

52+
/**
53+
* @api
54+
*/
3455
public ValidateService $validate;
3556

57+
/**
58+
* @api
59+
*/
3660
public FeedbackService $feedback;
3761

62+
/**
63+
* @api
64+
*/
3865
public HealthzService $healthz;
3966

4067
public function __construct(?string $apiKey = null, ?string $baseUrl = null)

src/Core/ServiceContracts/CrawlContract.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@
1313

1414
interface CrawlContract
1515
{
16+
/**
17+
* @api
18+
*/
1619
public function retrieveResults(
1720
string $taskID,
1821
?RequestOptions $requestOptions = null
1922
): CrawlGetResultsResponse;
2023

2124
/**
25+
* @api
26+
*
2227
* @param string $url Starting URL for crawling
2328
* @param int $depth Maximum crawl depth from starting URL
2429
* @param bool $extractionMode Use AI extraction (true) or markdown conversion (false)

src/Core/ServiceContracts/CreditsContract.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
interface CreditsContract
1111
{
12+
/**
13+
* @api
14+
*/
1215
public function retrieve(
1316
?RequestOptions $requestOptions = null
1417
): CreditGetResponse;

src/Core/ServiceContracts/FeedbackContract.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
interface FeedbackContract
1313
{
1414
/**
15+
* @api
16+
*
1517
* @param int $rating Rating score
1618
* @param string $requestID Request to provide feedback for
1719
* @param string|null $feedbackText Optional feedback comments

src/Core/ServiceContracts/GenerateSchemaContract.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
interface GenerateSchemaContract
1515
{
1616
/**
17+
* @api
18+
*
1719
* @param string $userPrompt Natural language description of desired schema
1820
* @param mixed $existingSchema Existing schema to modify or extend
1921
*/
@@ -23,6 +25,9 @@ public function create(
2325
?RequestOptions $requestOptions = null,
2426
): GenerateSchemaNewResponse;
2527

28+
/**
29+
* @api
30+
*/
2631
public function retrieve(
2732
string $requestID,
2833
?RequestOptions $requestOptions = null

src/Core/ServiceContracts/HealthzContract.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
interface HealthzContract
1111
{
12+
/**
13+
* @api
14+
*/
1215
public function check(
1316
?RequestOptions $requestOptions = null
1417
): HealthzCheckResponse;

src/Core/ServiceContracts/MarkdownifyContract.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
interface MarkdownifyContract
1414
{
1515
/**
16+
* @api
17+
*
1618
* @param string $websiteURL URL to convert to markdown
1719
* @param array<string, string> $headers
1820
* @param list<string> $steps Interaction steps before conversion
@@ -24,6 +26,9 @@ public function convert(
2426
?RequestOptions $requestOptions = null,
2527
): CompletedMarkdownify;
2628

29+
/**
30+
* @api
31+
*/
2732
public function retrieveStatus(
2833
string $requestID,
2934
?RequestOptions $requestOptions = null

src/Core/ServiceContracts/SearchscraperContract.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
interface SearchscraperContract
1414
{
1515
/**
16+
* @api
17+
*
1618
* @param string $userPrompt Search query and extraction instruction
1719
* @param array<string, string> $headers
1820
* @param int $numResults Number of websites to scrape from search results
@@ -26,6 +28,9 @@ public function create(
2628
?RequestOptions $requestOptions = null,
2729
): CompletedSearchScraper;
2830

31+
/**
32+
* @api
33+
*/
2934
public function retrieveStatus(
3035
string $requestID,
3136
?RequestOptions $requestOptions = null

0 commit comments

Comments
 (0)