Skip to content

Commit

Permalink
saveRecordingById
Browse files Browse the repository at this point in the history
  • Loading branch information
yparitcher committed Nov 24, 2024
1 parent a25cdb1 commit 309d35d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/RingCentral.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ public function saveRecordingById(string $recordingId, string $disk, string $pat
return $result ? $path : false;
}

public function saveRecordingById(string $recordingId, ?string $disk = null, string $path = ''): string|false {

Check failure on line 256 in src/RingCentral.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Cannot redeclare method SheavesCapital\RingCentral\RingCentral::saveRecordingById().
$response = $this->getRecordingById($recordingId);
$ext = ($response->header('Content-Type') == 'audio/mpeg') ? '.mp3' : '.wav';
$path = trim($path, '/').'/'.Str::random(2).'/'.Str::random(40).$ext;
$result = Storage::disk($disk)->put($path, $response->body());
return $result ? $path : false;
}

public function listWebhooks(): Collection {
return $this->get('/subscription')->collect('records');
}
Expand Down

0 comments on commit 309d35d

Please sign in to comment.