-
-
Save humandb/e47df0167070d77712f5 to your computer and use it in GitHub Desktop.
{ | |
"items" : [ | |
{ | |
"source" : { | |
"uri" : "s3://path/to/file.mp4", | |
"metadata" : {} | |
}, | |
"destination" : { | |
"uri" : "youtube://owner/channel-id", | |
"metadata" : { | |
"title" : "Test title", | |
"description": "Test description", | |
"tags": ["tag", "tag2"], | |
"privacyStatus" : "public", | |
"ownership" : { | |
"list": [], | |
"mode": "exclude" | |
}, | |
"matchPolicy": { | |
"contentType" : "audio", | |
"action" : "monetize", | |
"territories": { | |
"list" : [ "ES", "PT"], | |
"mode": "include" | |
} | |
}, | |
"usagePolicy" : { | |
"contentType" : "audiovisual", | |
"action" : "block", | |
"territories" : { | |
"list" : [], | |
"mode": "exclude" | |
} | |
} | |
} | |
} | |
} | |
] | |
} |
Although i think there can only be one usage policy (is that right?) a similar question to above, what if we want to block in some countries, track in others, and monetise in others? So not a list of usage policies but a list of 'usage policy conditions'
Having more than one condition could just throw a NotImplementedException for now, but it might be nice to have it in the structure ahead of time
Yes, you can have only one usage policy.
TBH, I don't see that coming in a foreseeable future so I wouldn't be bothered with that now, plus the code behind it should be flexible enough to support multiple match policies with minimal changes, in fact, it's just changing a Either[PolicyId, PolicyDefinition]
to List[Either[PolicyId, PolicyDefinition]]
and doing a couple of tweaks in the code.
Thinking about it, I guess really i'm talking about a policy of multiple rules, rather than multiple policies so you'd perhaps have to add some concept of a rule eventually. You can deal with it at the time - i guess i'm too used to old jobs where we didn't have tests or QA and building stuff in in advance reduced the chance of you breaking it on production later :p
Should we be adding an embeddable true/false into this for next sprint?
I was thinking exactly about the same thing, the change is the API would be minimal, something like,
"matchPolicies": [
{
"contentType" : "audio",
"action" : "monetize",
"territories": {
"list" : [ "ES", "PT"],
"mode": "include"
}
},
{
"contentType" : "audio",
"action" : "block",
"territories": {
"list" : [ "US", "CA"],
"mode": "include"
}
}
],
Cool as long as platform bear in mind this might happen eventually in their DB model, the change for them would be a single argument to an array later - which i guess is fine
Note to self, embeddable.
I know it's "catering for a future requirement" but should this accept lists of match policies? E.g. If we want to monetize in spain, but block in brazil and track in the UK?