Skip to content

Commit 707cff0

Browse files
chore: document parameter object usage
1 parent ec19244 commit 707cff0

File tree

6 files changed

+66
-0
lines changed

6 files changed

+66
-0
lines changed

src/Crawl/CrawlStartParams.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,21 @@
1111
use Scrapegraphai\Crawl\CrawlStartParams\Rules;
1212

1313
/**
14+
* An object containing the method's parameters.
15+
* Example usage:
16+
* ```
17+
* $params = (new CrawlStartParams); // set properties as needed
18+
* $client->crawl->start(...$params->toArray());
19+
* ```
1420
* Initiate comprehensive website crawling with sitemap support.
1521
* Supports both AI extraction mode and markdown conversion mode.
1622
* Returns a task ID for async processing.
1723
*
24+
* @method toArray()
25+
* Returns the parameters as an associative array suitable for passing to the client method.
26+
*
27+
* `$client->crawl->start(...$params->toArray());`
28+
*
1829
* @see Scrapegraphai\Crawl->start
1930
*
2031
* @phpstan-type crawl_start_params = array{

src/Feedback/FeedbackSubmitParams.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@
1010
use Scrapegraphai\Core\Contracts\BaseModel;
1111

1212
/**
13+
* An object containing the method's parameters.
14+
* Example usage:
15+
* ```
16+
* $params = (new FeedbackSubmitParams); // set properties as needed
17+
* $client->feedback->submit(...$params->toArray());
18+
* ```
1319
* Submit feedback for a specific request.
1420
*
21+
* @method toArray()
22+
* Returns the parameters as an associative array suitable for passing to the client method.
23+
*
24+
* `$client->feedback->submit(...$params->toArray());`
25+
*
1526
* @see Scrapegraphai\Feedback->submit
1627
*
1728
* @phpstan-type feedback_submit_params = array{

src/GenerateSchema/GenerateSchemaCreateParams.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@
1010
use Scrapegraphai\Core\Contracts\BaseModel;
1111

1212
/**
13+
* An object containing the method's parameters.
14+
* Example usage:
15+
* ```
16+
* $params = (new GenerateSchemaCreateParams); // set properties as needed
17+
* $client->generateSchema->create(...$params->toArray());
18+
* ```
1319
* Generate or modify JSON schemas based on natural language descriptions.
1420
* Can create new schemas or extend existing ones.
1521
*
22+
* @method toArray()
23+
* Returns the parameters as an associative array suitable for passing to the client method.
24+
*
25+
* `$client->generateSchema->create(...$params->toArray());`
26+
*
1627
* @see Scrapegraphai\GenerateSchema->create
1728
*
1829
* @phpstan-type generate_schema_create_params = array{

src/Markdownify/MarkdownifyConvertParams.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@
1010
use Scrapegraphai\Core\Contracts\BaseModel;
1111

1212
/**
13+
* An object containing the method's parameters.
14+
* Example usage:
15+
* ```
16+
* $params = (new MarkdownifyConvertParams); // set properties as needed
17+
* $client->markdownify->convert(...$params->toArray());
18+
* ```
1319
* Convert web page content to clean Markdown format.
1420
*
21+
* @method toArray()
22+
* Returns the parameters as an associative array suitable for passing to the client method.
23+
*
24+
* `$client->markdownify->convert(...$params->toArray());`
25+
*
1526
* @see Scrapegraphai\Markdownify->convert
1627
*
1728
* @phpstan-type markdownify_convert_params = array{

src/Searchscraper/SearchscraperCreateParams.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@
1010
use Scrapegraphai\Core\Contracts\BaseModel;
1111

1212
/**
13+
* An object containing the method's parameters.
14+
* Example usage:
15+
* ```
16+
* $params = (new SearchscraperCreateParams); // set properties as needed
17+
* $client->searchscraper->create(...$params->toArray());
18+
* ```
1319
* Performs web search, selects relevant URLs, and extracts structured data from multiple websites.
1420
* Uses LLM to refine search queries and merge results from different sources.
1521
*
22+
* @method toArray()
23+
* Returns the parameters as an associative array suitable for passing to the client method.
24+
*
25+
* `$client->searchscraper->create(...$params->toArray());`
26+
*
1627
* @see Scrapegraphai\Searchscraper->create
1728
*
1829
* @phpstan-type searchscraper_create_params = array{

src/Smartscraper/SmartscraperCreateParams.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@
1010
use Scrapegraphai\Core\Contracts\BaseModel;
1111

1212
/**
13+
* An object containing the method's parameters.
14+
* Example usage:
15+
* ```
16+
* $params = (new SmartscraperCreateParams); // set properties as needed
17+
* $client->smartscraper->create(...$params->toArray());
18+
* ```
1319
* Main scraping endpoint with LLM-powered content analysis. Supports various fetching providers,
1420
* infinite scrolling, pagination, and custom output schemas.
1521
*
22+
* @method toArray()
23+
* Returns the parameters as an associative array suitable for passing to the client method.
24+
*
25+
* `$client->smartscraper->create(...$params->toArray());`
26+
*
1627
* @see Scrapegraphai\Smartscraper->create
1728
*
1829
* @phpstan-type smartscraper_create_params = array{

0 commit comments

Comments
 (0)