4
4
5
5
namespace Scrapegraphai \ServiceContracts ;
6
6
7
+ use Scrapegraphai \Core \Exceptions \APIException ;
7
8
use Scrapegraphai \Core \Implementation \HasRawResponse ;
8
9
use Scrapegraphai \Crawl \CrawlGetResultsResponse ;
9
10
use Scrapegraphai \Crawl \CrawlStartParams \Rules ;
@@ -18,12 +19,27 @@ interface CrawlContract
18
19
* @api
19
20
*
20
21
* @return CrawlGetResultsResponse<HasRawResponse>
22
+ *
23
+ * @throws APIException
21
24
*/
22
25
public function retrieveResults (
23
26
string $ taskID ,
24
27
?RequestOptions $ requestOptions = null
25
28
): CrawlGetResultsResponse ;
26
29
30
+ /**
31
+ * @api
32
+ *
33
+ * @return CrawlGetResultsResponse<HasRawResponse>
34
+ *
35
+ * @throws APIException
36
+ */
37
+ public function retrieveResultsRaw (
38
+ string $ taskID ,
39
+ mixed $ params ,
40
+ ?RequestOptions $ requestOptions = null
41
+ ): CrawlGetResultsResponse ;
42
+
27
43
/**
28
44
* @api
29
45
*
@@ -38,6 +54,8 @@ public function retrieveResults(
38
54
* @param bool $sitemap Use sitemap for crawling
39
55
*
40
56
* @return CrawlStartResponse<HasRawResponse>
57
+ *
58
+ * @throws APIException
41
59
*/
42
60
public function start (
43
61
$ url ,
@@ -51,4 +69,18 @@ public function start(
51
69
$ sitemap = omit,
52
70
?RequestOptions $ requestOptions = null ,
53
71
): CrawlStartResponse ;
72
+
73
+ /**
74
+ * @api
75
+ *
76
+ * @param array<string, mixed> $params
77
+ *
78
+ * @return CrawlStartResponse<HasRawResponse>
79
+ *
80
+ * @throws APIException
81
+ */
82
+ public function startRaw (
83
+ array $ params ,
84
+ ?RequestOptions $ requestOptions = null
85
+ ): CrawlStartResponse ;
54
86
}
0 commit comments