-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query for Post List #4
Comments
Here are the notes about IndieWeb implementation from the brainstorming page:
|
@cleverdevil Post List Query discussion has moved here, for when you want to work on integrating into Known |
It has been discussing that using paging should probably be similar to Microsub (https://indieweb.org/Microsub-spec#Example_Paging_Workflow) where the server provides both after and before strings for pagination. The server will then return results as appropriate. When you reach the point that there are no more results available, the results don't contain an after string. The pagination tokens are opaque to the client, so they can be anything the server wants: page numbers, date string, post ids, etc. |
It probably makes sense to include the limit parameter from Microsub as well. So that would put us at:
As already included in the original spec:
|
I think the specific property queries might be more difficult to map into the url parameters. They could potentially follow a similar format to the micropub update spec In particular like the In my mind there needs to be 2 types of queries on properties at least:
There are also a number of others that may be worth having, but I am not so sure are as vital:
|
Another one worth considering would be a sort or order parameter. I can imagine clients wanting to either retrieve posts in chronological or reverse chronological order at a minimum. And potentially even ordering by other properties, eg. Alphabetical by post title. Although I can't think of a solid use case for that right now. |
I've updated my implementation so I support a bunch of new features expanding on what @EdwardHinkle already mentioned When using
|
FYI, I have a local branch of Known that supports:
I'm closely watching this thread, and if we can come to a consensus, I should be able to have a fully compliant implementation for Known in short order. Things that need to be decided, from what I can tell:
I will say that the |
Can someone write down here a valid use case for post type queries? I'm sure there were some but I can't remember why they'd be needed if property queries are supported |
Here is a link to the previous reasons cited: https://chat.indieweb.org/dev/2018-08-09#t1533837539815600 To summarize, there are instances where just a single property existing does not define some more complicated post types. So it means you either have to define complicated requirements in URL parameters (including that certain properties DON’T exist) or you use the PTD by using a post-type parameter. Some examples:
|
I like the post-type filter, and I guess in combination with the post-type discovery, we can either expose them or not in the micropub clients. In the case of the Drupal module: I map every micropub post to a different content type in Drupal. When a q=source would come in with a post-type filter, it would be very easy to filter out, so I'm +1 on that filter :) I'm going to experiment with this the next week to add this to the drupal module and into indigenous for android. Since I've added basic update post support, having a list to quickly edit (instead of having to copy over urls and such), a very simple list would make my life extremely easy! |
So the post list and post-type filter is in the latest release of the indigenous android client and drupal module. The post list listens to the post-type discovery as well, so if none is found, filtering is not possible at the moment. I'll gradually add more filter options (like limit) and paging in the next week. |
So now that this is becoming more widely spread, I am starting to have issues with implied post types and micropub queries. Mostly around whether something should be a specific post type or if it should be any post type with a specific property. My 2 main use cases, (which I think are totally valid, and either in wide spread use or wanted):
Having written these out I think my main issue is around the creation of custom post types and whether they should be actual post types, or just properties and how that works with micropub queries |
@grantcodes it looks like half your post is missing because you only mention 1 use case |
@EdwardHinkle Yeah, published early by accident, updated now. |
What if we do something like this as query params for properties:
That would make sure we don't end up with a dozen of property-{property-name} options for the query. |
@swentel how would you then do multiple values at once? |
Sending an array then: property-name[0]=post-status&property-value[0]=draft&property-name[1]=name&property-value[1]=title Which makes it probably a bit less readable, but still remains flexible, at least imo. |
Support for q=source (and editing and deleting posts) has been deployed on Micro.blog. It uses the MF2-style JSON as described on the wiki for the response. Thanks y'all! |
Is the expectation for this that will contain all of the properties? Or could just be the URL/UID? For instance, I've got a static site, so my Micropub endpoint would proxy a generated file from the site. If I can reduce the amount of properties to add to this, it'd be good, especially if this is really only being used for post listing. (Originally published at: https://www.jvt.me/mf2/2020/04/3qnnb/) |
Follow-up for anyone interested, I have generated all the properties and return them when using q=source (Originally published at: https://www.jvt.me/mf2/2020/06/maoih/) |
Answer to my question: Indigenous for Android expects that this list is the full post's content, as it renders some of the information (as seen in https://media.jvt.me/5a9abbb797.png) and I found would break if any (Originally published at: https://www.jvt.me/mf2/2020/07/sm4ec/) |
Do we have a sense of what properties we should consider “standardized” from this list? I’ve reworked my implementation (it includes support for custom pages and some markup for tags so I can add more information to their standalone pages). Nothing really changes with regards to that but it does means that I’m looking for the field (Originally published at: https://v2.jacky.wtf/post/ef485fa8-33af-4f02-8844-572373a4fd74) |
For whatever it's worth, here's an example of the "standard" properties that Micro.blog always returns. At a minimum, I'd think most servers should return
|
I'd prefer to keep it as a fairly minimal list, maybe even just the |
Servers should at least have the option to return |
That's fair enough - if we can clarify that they're not required properties, then that'd allow clients to be built more resiliently 👍 |
Throwing a wrench into the mix? How do people see a query for all posts that have a property matching a particular value? Like if the |
Is anyone implementing queries like |
I have a tracking ticket for Koype for implementing |
There's quite a few things here in this issue. Would it make sense to split it up maybe into some sort of list of items? I don't know if @EdwardHinkle would be willing to add them to the bottom of the top-entry so it'd be easier to link to (with headings) on the Wiki. (Originally published at: https://jacky.wtf/2022/7/OWkL) |
Good idea @jalcine. I feel like some of the older suggestions in this issue (like basic support for |
Issue closed as remaining sub-topics now split into separate issues. |
Thanks @dshanske! |
Discussion for adding a way to query a list of posts from the Micropub endpoint (https://indieweb.org/Micropub-extensions#Query_for_Post_List)
Below are some thoughts from the brainstorming page.
Use Cases
Query Parameters
In order to achieve the above use cases there would need to be a robust query system in place. It would need to be able to query for:
in-reply-to
== 'example.com')Other Considerations
The text was updated successfully, but these errors were encountered: