library rev-api
PHP library for the rev.com api
unl/rev-api
PHP library for the rev.com api
- Tuesday, September 15, 2015
- by mfairchild365
- Repository
- 5 Watchers
- 5 Stars
- 2,787 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 2 Forks
- 2 Open issues
- 6 Versions
- 11 % Grown
, (*1)
rev_api
rev.com api in PHP, (*2)
Examples
//Start the Rev api client
$rev = new Rev('client api key', 'user api key');
//upload a video
$input = $rev->uploadVideoUrl(self::MEDIA_URL);
//Create an order
$order = new CaptionOrderSubmission($rev);
//Add the video to the order
$order->addInput($input);
//Set some order details
$order->setClientRef('example reference number');
$order->setComment('example comment');
$order->setNotification('http://example.org/test.php', CaptionOrderSubmission::NOTIFICATION_LEVEL_DETAILED);
$order->setPriority(CaptionOrderSubmission::PRIORITY_TIME_INSENSITIVE);
$order->setOutputFormats(array('WebVtt', 'SubRip'));
//Send the order
$order_number = $order->send();
//get the order
$order = $rev->getOrder($order_number);
//display the order status
$order->getStatus();
//get order attachments
foreach ($completed_order->getAttachments() as $attachment) {
if (!$attachment->isMedia()) {
//Only get attachments that rev.com has completed (captions)
//Display the content as its default content type
echo $attachment->getContent();
//Display the content as a different content type
echo $attachment->getContent('.txt');
}
}
//Cancel the order
$rev->cancelOrder($order_number);
//Get the first page of orders
$orders = $rev->getOrders();
foreach ($orders as $order) {
echo $order->getOrderNumber();
}
//Get the rest of the pages
while ($orders = $orders->getNextPage()) {
foreach ($orders as $order) {
echo $order->getOrderNumber();
}
}
Implementation Progress:
- [ ] POST /inputs
- [x] -- via URL
- [ ] -- via upload
- [ ] -- via upload w/ multipart requests
- [x] POST /orders (Transcription)
- [x] POST /orders (Caption)
- [x] POST /orders (Translation)
- [x] GET /orders/{order_num}
- [x] GET /orders
- [x] -- by page
- [ ] -- by list of IDs
- [x] GET /orders/{order_num}/cancel
- [x] GET /attachments/{id}
- [x] GET /attachments/{id}/content
dev-master
9999999-dev
PHP library for the rev.com api
Sources
Download
BSD
The Requires
The Development Requires
dev-develop
dev-develop
PHP library for the rev.com api
Sources
Download
BSD
The Requires
The Development Requires
v0.1.2-beta
0.1.2.0-beta
PHP library for the rev.com api
Sources
Download
BSD
The Requires
The Development Requires
dev-vcr-guzzle
dev-vcr-guzzle
PHP library for the rev.com api
Sources
Download
BSD
The Requires
The Development Requires
v0.1.1-beta
0.1.1.0-beta
PHP library for the rev.com api
Sources
Download
BSD
The Requires
The Development Requires
v0.1-beta
0.1.0.0-beta
PHP library for the rev.com api
Sources
Download
BSD
The Requires
The Development Requires