Skip to content

Commit 89af154

Browse files
New API parameters
1 parent 2f08af1 commit 89af154

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Tabscanner/Api.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ public function __construct($api_key, $api_url = 'https://api.tabscanner.com/')
1515
$this->api_url = $api_url;
1616
}
1717

18-
public function upload($file, $credit = 0)
18+
public function upload($file, $user_id = 0)
1919
{
2020
$client = new Client();
2121
$api_upload_url = $this->api_url . $this->api_key . '/process';
2222
$file_type = gettype($file);
2323
$validate = $this->validate($file);
2424

25-
if ($credit) {
26-
$api_upload_url = $this->api_url . $this->api_key . '/process/' . $credit;
27-
}
28-
2925
if ($validate['error']) {
3026
$response = [
3127
'message' => $validate['message'],
@@ -60,6 +56,14 @@ public function upload($file, $credit = 0)
6056
'name' => 'file',
6157
'filename' => $filename,
6258
'contents' => $content
59+
],
60+
[
61+
'name' => 'lineExtract',
62+
'contents' => true
63+
],
64+
[
65+
'name' => 'dashboardUserId',
66+
'contents' => $user_id
6367
]
6468
]
6569
]);

0 commit comments

Comments
 (0)