tboothman / imdbphp

PHP library for retrieving film and tv information from IMDb
247 stars 84 forks source link

Sharing methods that are converted to GraphQL #314

Closed duck7000 closed 10 months ago

duck7000 commented 1 year ago

@all

I have successfully converted methods to GraphQL: Locations Soundtrack Quotes Trivia (including spoiler check) Genres Rating Aka (added original title to aka query, no need for extra method) Title_year Metacritic Plotoutline Country Language Mpaa Top250 Episodes (byYear is now working) Director Writer Composer Producer Votes isOngoing (new: used to get if TV Series is still going or ended) gross budget

New method principalCredits (it will fetch Director, Writer, Creator and Cast from top title page if available) This replaces Creator() and headStars()

Feel free to use them here in imdbphp but remember that my version differs from this version so you can't copy the methods directly. Adjustments are needed. They are basically the same but might fetch more data or in different format.

I have no more interest in making pull requests for those methods, let's say there is a reason that i use my own version.

This way i can still contribute to this version, i hope that somebody will pick this up further so everybody can benefit from it.

Edit: @tboothman I was skeptical to the move to GraphQL but i have to fully admit that it is actually much easier is to work with. That is.. after you figure out how it works... Thanks for your groundwork about GraphQL.!

jcvignoli commented 1 year ago

Hi @duck7000, Since I use Person class, I will stick to the tboothman version, but thanks for the idea!

duck7000 commented 1 year ago

Sure i understand that but maybe you can use my work to convert the person class (or title class methods) and create PR? I'm probably not going to do that as I'm not using the person class myself but it will benefit a lot of users here.

jcvignoli commented 12 months ago

@duck7000 Thanks for the effort! But your version is not yet ready for my use, actually. I overwrited Boothman's classes with yours, and there are actually missing methods (I briefly saw photo_url() for example) which prevented me to go further. I will have to take a look in depth at a later stage, since it's seems that Boothman is more or less stoping the development. Cheers and thanks for your work!

jcvignoli commented 12 months ago

Hey @duck7000 I'm not certain to fully understand the two edits: do you mean that I should copy Boothman's photo_local() method into your class? It'd be a bad idea for my use. In terms of maintainability it'd be soon a nightmare (I develop a wordpress plugin based on imdbphp classes), there are many other methods that I should copy at every new release ( photo_local() depends on savephoto(), ie).

jcvignoli commented 12 months ago

Thanks for the clarification. I use most of the methods in Title and Person. Will wait to see if have the time and willingness to expand your version, since seems that GraphQL is the new way to go :)