You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is recommended to use the `with` constructor `Dog::with(name: "Joey")`
65
+
and named parameters to initialize value objects.
66
+
67
+
However builders are provided as well `(new Dog)->withName("Joey")`.
68
+
61
69
### Handling errors
62
70
63
71
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Scrapegraphai\Errors\APIError` will be thrown:
@@ -66,21 +74,19 @@ When the library is unable to connect to the API, or if the API returns a non-su
66
74
<?php
67
75
68
76
use Scrapegraphai\Errors\APIConnectionError;
69
-
use Scrapegraphai\Smartscraper\SmartscraperCreateParams;
70
77
71
-
$params = SmartscraperCreateParams::with(
72
-
userPrompt: "Extract the product name, price, and description"
0 commit comments