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

No way to get videos #37

Closed
maxdmyers opened this issue Jan 16, 2020 · 4 comments
Closed

No way to get videos #37

maxdmyers opened this issue Jan 16, 2020 · 4 comments

Comments

@maxdmyers
Copy link

I can add use the following code to get TMdb to return videos to me, but I have no way to access them using the Items\Movie class.

$item->getMovie($movie['id'], ['append_to_response' => 'videos'])

@vfalies
Copy link
Owner

vfalies commented Jan 17, 2020

It is a feature not yet implemented. I will develop it as soon as possible.

But, the implementation will not use your example. The second params 'option' of this call is to set option on response structure (as language of the response), not to add/search data.

I think that I will add some new methods to get this type of data.

@vfalies
Copy link
Owner

vfalies commented Jan 17, 2020

This feature is now available in release 1.7.

You can use it like this:

$infos = $item->getMovie($movie['id']);
$responses = $infos->getVideos();

foreach ($responses as $response)
{
    echo $response->getName();
}

@vfalies vfalies closed this as completed Jan 17, 2020
@maxdmyers
Copy link
Author

Thank you! I've found your wrapper to be quite useful.

@maxdmyers
Copy link
Author

maxdmyers commented Jan 20, 2020

Am I doing something incorrectly? I'm not getting any results back (I was with my implementation of getVideos - a lot rougher, but it worked).

$item = new Item($this->tmdb); $trailers = $item->getMovie(11)->getVideos();

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

No branches or pull requests

2 participants