Giter VIP home page Giter VIP logo

Comments (2)

thebaer avatar thebaer commented on June 12, 2024

Thanks for reporting this. Can you share a bit more about your use case, so I can understand why you might want pinned posts at that endpoint? Right now, it's designed to only provide a feed of posts.

from writefreely.

algernon avatar algernon commented on June 12, 2024

My use case was that I wanted to have a WriteFreely blog where the content is externally managed: as in, have a directory full of markdown files, which a script would sync to my WriteFreely instance, add them to the relevant collections, pin them if necessary, and so on. Part of this sync was deleting obsolete posts. I originally wanted to implement this by listing posts in the main collection (I only used one), but ran into this problem, that pinned posts weren't listed there, so I couldn't delete obsolete ones (I did not wish to keep track of post IDs already posted: everything that's not in the source repo should be considered obsolete, and to be deleted).

I eventually switched to /api/me/posts, which did list the pinned ones too, and worked in my case (I had a single user, with a single collection). It would have been a lot more annoying if I had multiple users - still doable, but more annoying.

This particular case would be nicely supported if /api/collections/{collection}/posts would take a pinned=true query parameter, because then the use case would work for collections that have posts from multiple users, too.

from writefreely.

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.