Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new class and fixing IngestRequest class to allow retranscoding requests. #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Tiriel
Copy link

@Tiriel Tiriel commented Jun 29, 2016

Added a new class IngestRequestRetranscode with single attribute use_archived_master mirroring Brightcove Dynamic Ingest API field, to be filled with bool (default to true).

Modified IngestRequest::createIngest() to reflect new possibility: changed param order to make $url optional, create conditional statement for selecting proper IngestRequestMaster/Retranscode field.

@Tiriel Tiriel closed this Jul 22, 2016
@Tiriel Tiriel reopened this Jul 22, 2016

use Brightcove\Object\ObjectBase;

class IngestRequestRetranscode extends ObjectBase {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have a common ancestor for IngestRequestMaster and IngestRequestRetranscode even if they have no common properties. This would signal that they are related.

@@ -44,10 +44,15 @@ public function __construct() {
$this->fieldAliases["capture_images"] = "capture-images";
}

public static function createRequest($url, $profile) {
public static function createRequest($profile, $url = null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the parameter order shouldn't be swapped, and the possiblity of a null url should be documented (we cannot drop PHP 5 now, but in PHP 7.1+ the type should be ?string).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants