php-tmdb / api

PHP 7.3+ API Wrapper for The Movie Database
MIT License
405 stars 112 forks source link

New feature /person/{id}/tagged_images #30

Closed Piero87 closed 10 years ago

Piero87 commented 10 years ago

Hi, i love your library, really love it! I want know if you will add the new feature of the TheMovieDB API to get the tagged people in images: /person/{id}/tagged_images.

Thanks!

wtfzdotnet commented 10 years ago

Hi piero,

As you can look up I pushed some new stuff up to github last weekend, I'm working on it but don't have much time. I might try and catch up this weekend, depends how fast I complete other things that are currently going on. I can't make any promises I'm sorry but it will be added.

You're welcome to integrate it yourself though and send me a pull request.

wtfzdotnet commented 10 years ago

Thanks for the love by the way! And please do let me know what you use it for :-) Feedback is much appreciated!

Piero87 commented 10 years ago

ok, when i start the project i will tell you what i use it for :)

wtfzdotnet commented 10 years ago

Finished something sooner than I expected :-) looking into it right now

Piero87 commented 10 years ago

Great! Very very good news, thank you very much :)

wtfzdotnet commented 10 years ago

@Piero87 what exactly would you like to consume, I see Travis changed the API a bit which will have bigger consequences than I can do with short time right now.

wtfzdotnet commented 10 years ago

The fastest thing I can do right now is provide an update where you get the images but the media and media_type keys are ignored.

Piero87 commented 10 years ago

Thank you, have the images without the media for now it's fine :)

wtfzdotnet commented 10 years ago

I'll work on this right now, meanwhile I have sent Travis an e-mail to try and get some more insight into how TMDB is modeled internally to match it better. Will get back to you in a bit!

Piero87 commented 10 years ago

ok, thanks :)

wtfzdotnet commented 10 years ago

@Piero87 do you happen to know an author which has tagged images? Having troubles to find one?

wtfzdotnet commented 10 years ago

Preferably the internal tmdb id :-)

Piero87 commented 10 years ago

i haven't understand very much your question :smile:

Piero87 commented 10 years ago

i don't need the author that tagged the image, but only the people tagged in the image :)

wtfzdotnet commented 10 years ago

I don't believe this is what the API provides, it specifically only states:

Get the images that have been tagged with a specific person id. We return all of the image results with a media object mapped for each image.

Meaning we get all the images an actor has been tagged in, not an image authors have been tagged in.

Piero87 commented 10 years ago

yes yes it's perfect, it's what i need, maybe i explain me bad, my english is not perfect :smile:

wtfzdotnet commented 10 years ago

I found one :-) working on it

Piero87 commented 10 years ago

ok :), i have a curiosity, i have add your library like you say in the documentation with composer, to update it with this new feature what i have to do? it's automatic right?

wtfzdotnet commented 10 years ago

Yes, just for time being as soon as I push the update you have to adjust your composer.json to point it to "dev-develop" untill a new stable version is released.

Piero87 commented 10 years ago

in this way? { "require": { "wtfzdotnet/php-tmdb-api": "dev-develop" } }

wtfzdotnet commented 10 years ago

Correct

wtfzdotnet commented 10 years ago

@Piero87 just pushed it, let me know if it works for you.

wtfzdotnet commented 10 years ago

Just review https://github.com/wtfzdotnet/php-tmdb-api/commit/701e5291eef1a165b9f35a1837a5c24fbf28d1a9

Piero87 commented 10 years ago

Great i'm trying it now :)

Piero87 commented 10 years ago

i have download the develop version but i can't find the tagged_images.php example, and also the method doesn't work:

$taggedImages = $client->getPeopleApi()->getTaggedImages(287);

give me this:

Fatal error: Call to undefined method Tmdb\Api\People::getTaggedImages()

i have lost something?

wtfzdotnet commented 10 years ago

Add me on hangouts: michael@wtfz.net

Piero87 commented 10 years ago

it's worked now, i have update composer, and i have re-download your library, and it's work all perfectly :) thank you soooo much :)

wtfzdotnet commented 10 years ago

Glad to hear that! Don't forget to let me know in the future what you use it for :-) it stays confidential. I will leave this issue open because it still does not cover the full implementation. Waiting for Travis to give me some deeper insight of the TMDB internals. Glad you love the lib!

Piero87 commented 10 years ago

ok i will do it :) when you think to release the official update?

wtfzdotnet commented 10 years ago

As soon as I get up to speed with all the other updates, maybe this weekend or the one after.

wtfzdotnet commented 10 years ago

Also depends on the amount of changes the response from Travis will bring as "media" within images is a completely new thing. Need to make sure I model it right.

Piero87 commented 10 years ago

ok perfect :) have you got an apple device?

wtfzdotnet commented 10 years ago

Mentioning apple is like cursing around me ;) don't bring that up again lol :p

Piero87 commented 10 years ago

why? :smile: you don't like apple device? i ask you that because i want give you a promo code of my app :)

wtfzdotnet commented 10 years ago

Haha no I really don't like Apple at all for my own reasons :-), so a promo code won't do me any good unless it's available on Android ;).

Piero87 commented 10 years ago

no only on iOS for now :) anyway thank you again very much, and have a good night :)

wtfzdotnet commented 10 years ago

Bummer :) your at most welcome, make sure to keep in touch with your developments! I'll get back to this ticket once I get some insight in the TMDB internals to match the media and media_type keys correctly. For now they are ignored.

Piero87 commented 10 years ago

ok! :)

Piero87 commented 10 years ago

Hi! i have tried it deeply, and i have notice that there is also the request for the number of page, it's already possible insert the parameter for the page?

wtfzdotnet commented 10 years ago

Just like your other question, you can simply provide these parameters in the $parameters array which all methods have. The Api/ classes don't validate any parameters, that is your responsibility and thus freedom.