GithubHelp home page GithubHelp logo

Comments (4)

florentsorel avatar florentsorel commented on August 17, 2024

Sorry to reopen this issue, but why in the Tmdb\Client this commit 249855e is not present ? I need to get information about rate limit.

For example I use the discover repository:

$this->repository->getClient()-> but in Tmdb\Client the following methods are not present:
getRateLimitFromLastResponse
getRateLimitRemainingFromLastResponse
getRateLimitResetFromLastResponse

I can do that:

$data = $this->repository->discoverTv($query);
dd($this->repository->getClient()->getHttpClient()->getLastResponse()->getHeaders());

All headers are returned

but with that:

$data = $this->repository->discoverTv($query);
dd($this->repository->getClient()->getHttpClient()->getLastResponse()->getHeader('X-RateLimit-Remaining'));

Call to undefined method Tmdb\HttpClient\Response::getHeader()

from api.

wtfzdotnet avatar wtfzdotnet commented on August 17, 2024

I'll look into this tomorrow with some other maintenance duties, I hope you can understand I can't remember the exact details right now about a commit from 1.5 years ago :-)

Are you running the latest version? ( I'd assume you are but just in case ... ) If not what version are you on?

from api.

florentsorel avatar florentsorel commented on August 17, 2024

I undertand, don't worry :).
Yes I use the last version (I use the wrapper with the laravel package)

from api.

wtfzdotnet avatar wtfzdotnet commented on August 17, 2024

@Rtransat the branch you are referring to never got merged, as this was an implementation with a different background of dependency versions. ( Took TMDB a long time to actually implement the RFC ).

In the Response object there is no getHeader method currently, however calling getHeaders()->get('X-Header') should do the job.

from api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.