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

Not sure why a call to an asset is returning an error. #28

Closed
not-original opened this issue Nov 17, 2017 · 3 comments
Closed

Not sure why a call to an asset is returning an error. #28

not-original opened this issue Nov 17, 2017 · 3 comments

Comments

@not-original
Copy link

This one is driving me slightly batty.
If I make a call to get the assets of 'Making of American Nutcracker':

$assets=$client->get_child_items_of_type('67a1e24f-0a99-498d-aed7-a4bfcfdb8d38', 'episode', 'asset', array('platform-slug' => 'partnerplayer'));

I get about 7 videos returned which all fit the query. (2 Preview Types and 5 Clip Types).

However, when I to pull detail on the asset:

The 'clips' returns an error with Not Found:
$episode=$client->get_asset('e260a2a6-9bd0-4d4a-89db-ef3caac42909');
$episode=$client->get_asset('88255325-fa52-4dfb-a485-b69b33af687e');

The 'previews' return just fine:
$episode=$client->get_asset('2dacc1ae-e25c-4c21-a4b0-27c5e4631d9f');

Other programs do not have this issue, clips, previews, full-length all return the correct response.

I have looked through the response from the get_child_of_type call, seeing if there is any kind of 'flag' or something that says these assets should not be pulled. But I don't see anything, as they are all available on the partner player.

To further making things strange, these additional clips don't even appear over on the video.pbs.org page:
http://www.pbs.org/show/making-new-american-nutcracker/

So I feel like I should be filtering them out, but not sure what query arg I should add.

Any help appreciated.

@augustuswm
Copy link
Collaborator

Can you try:

$episode = $client->get_asset('88255325-fa52-4dfb-a485-b69b33af687e', false, ['platform-slug' => 'partnerplayer']);

It looks like the asset is marked as only Partner Player, and by default I don't think a platform-slug is passed by the client.

@tamw-wnet
Copy link
Owner

Following up on what @augustuswm said, this would confirm why these clips don't appear on the video.pbs.org page. If they not marked to allow 'pbsorg' as a platform, they wouldn't show up there.

@not-original , the filter args you should use will really be determined by where you want to render these assets. If you're looking to show them in the Partner Player, platform-slug => partnerplayer is definitely what you want to use. If you don't have a context for letting Passport members log in, you might also want to pass a filter for the availability window -- I'm not actually sure what the syntax from PBS is, the documentation isn't clear if we want to filter by 'window' => 'public' , 'availability' => 'public', or the alternative plurals (windows, availabilities).

@not-original
Copy link
Author

Thanks much @augustuswm -- that did the trick.

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

No branches or pull requests

3 participants