Git Product home page Git Product logo

Comments (3)

pycal avatar pycal commented on July 28, 2024

So I've found a solution for my particular problem.

Something like this will only ever return a max of 100 objects (despite my MAX_POSTS_PER_PAGE being set to 500):

/wp_api/v1/posts?per_page=500&post_type=glossary

However this will return all objects in the post_type I am querying:

/wp_api/v1/posts?per_page=-1&post_type=glossary

from thermal-api.

kevinlangleyjr avatar kevinlangleyjr commented on July 28, 2024

When you are defining MAX_POSTS_PER_PAGE, are you defining it with the appropriate namespace?

It should be \Voce\Thermal\v1\MAX_POSTS_PER_PAGE

I was not able to replicate the issue you stated of being able to query with and return more results than what is set for MAX_POSTS_PER_PAGE. I could specify 200 but since the default for MAX_POSTS_PER_PAGE is 100, that is the max. Once I changed the value for \Voce\Thermal\v1\MAX_POSTS_PER_PAGE I am being returned the correct result set.

from thermal-api.

kevinlangleyjr avatar kevinlangleyjr commented on July 28, 2024

I'm still not able to replicate issue here and without any response from the user, I am closing this issue.

If needed, please comment on the issue and we can re-open it or open a new issue.

from thermal-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.