Giter VIP home page Giter VIP logo

Comments (6)

cyle avatar cyle commented on August 25, 2024 2

Yes, exactly. Sorry if that was a bit confusing.

All of the current API endpoints for fetching posts (like the one above) can possibly return legacy posts alongside new NPF posts, depending on how the post was made. To maintain backwards compatibility, new NPF posts will look and act like legacy text/regular type posts using these endpoints (hence why they have body set). You can change this behavior and have post content served consistently as NPF by setting npf=true via a query string parameter, which is more closely aligned with how we deal with post content within Tumblr's official clients.

from docs.

cyle avatar cyle commented on August 25, 2024 1

I think you should state that in the docs, it's not really clear.

Sure, happy to try to make this clearer. I'll see what I can do. 👌

from docs.

cyle avatar cyle commented on August 25, 2024

This is likely a consequence of the newer post being saved in the Neue Post Format, and the older one being saved in the legacy format. Generally speaking, post types are becoming deprecated on Tumblr under the hood. You can read more about this here and on the Engineering blog in general, as well as the documentation in this repo for the NPF spec. I strongly encourage you to check out leveraging ?npf=true and the Neue Post Format JSON so you can get consistent results here. You can still use filters like /posts/photo, but it may not always work the way you expect for new posts, see the legacy post type mapping here. Hope this helps!

from docs.

sorin-costea avatar sorin-costea commented on August 25, 2024

Just to understand better, you mean that the above weird answer is a consequence of requesting a NPF post over the old API?

from docs.

thagxt avatar thagxt commented on August 25, 2024

Thank you for your answer @cyle! I've tried and it works with npf=true.
I think you should state that in the docs, it's not really clear.

from docs.

cyle avatar cyle commented on August 25, 2024

Updated the docs with some blurbs about this, FYI ba6c02e

from docs.

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.