We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d4777f commit fcafe4cCopy full SHA for fcafe4c
Tabscanner/Api.php
@@ -15,13 +15,17 @@ public function __construct($api_key, $api_url = 'https://api.tabscanner.com/')
15
$this->api_url = $api_url;
16
}
17
18
- public function upload($file)
+ public function upload($file, $credit = 0)
19
{
20
$client = new Client();
21
- $api_upload_url = $this->api_url . $this->api_key . '/process';
+ $api_upload_url = $this->api_url . $this->api_key . '/process';
22
$file_type = gettype($file);
23
$validate = $this->validate($file);
24
25
+ if ($credit) {
26
+ $api_upload_url = $this->api_url . $this->api_key . '/process/' . $credit;
27
+ }
28
+
29
if ($validate['error']) {
30
$response = [
31
'message' => $validate['message'],
0 commit comments