You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are the notes about IndieWeb implementation from the brainstorming page:
j4y_funabashi implemented an extension to the q=source query on my micropub endpoint, if no url is provided it returns a list of posts. Not yet paginated but that is the plan.
eddiehinkle implemented the q=source query extension.
When no url is provided, it returns a list of posts.
It doesn't support pagination yet, but currently returns all posts within the last month
It does support a post-type filter that will filter out what posts are returned based on the post type discovery, similar to Query for supported vocabulary #1
grantcodes implemented an experimental extension that uses the mongodb query syntax since his posts are stored in MongoDB
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.
In particular like the delete parameter which can either specify just the property name to delete or the value to delete.
In my mind there needs to be 2 types of queries on properties at least:
A specific property exists
A specific property contains a given value - eg. post-status = draft
This could get more complex, if you wanted to match an entire array (eg. category = ['foo', 'bar']) or just contains the given parameter
There are also a number of others that may be worth having, but I am not so sure are as vital:
A property does not exists / is empty
A property value does not equal a given value
A property value is less than, greater than etc. compared to a given value
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.
FYI, I have a local branch of Known that supports:
q=source
&url=
&limit=
&offset=
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 &post-type parameter would be a bit difficult to implement in Known at this stage, because Known doesn't currently have any such notion. That said, a mechanism could be created that would map Known "Entity" types to post-types from the Post Type Discovery spec. I'd likely need direction from @benwerd and @mapkyca on how to do it.
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
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:
both Podcasts, Articles and Issues have a Title. So how do you get all articles but not podcast episodes or issues when they all have titles?
Determining the difference between Video and Photo posts because Videos often have a photo property.
Using PTD protects against new experimental post types getting returned erroneously because it happens to have the same property as another post type.
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):
Drafts - Obviously there is post-status = draft But drafts are not defined by post type discovery at the moment. So at the moment to get a list of drafts there would either need to be a post-type=draft query or the client and server would both need to support property-post-status=draft.
Private journal entries - Again there is no post type defined for journals, and this time no property that is specific to journals. Personally I just make a note with post-status=private and category=journal. If I wanted to expose these to a micropub client I would likely need to make my own custom post type.
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
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 nulls were found.
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 type now as well to determine h-entry, h-x-page and h-x-category (the latter being custom for reasons).
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 content, published, and url. The URL will be needed for editing.
I'd prefer to keep it as a fairly minimal list, maybe even just the type, uid and url, and then require a follow-up call to q=source&url=... if a given post is required. This (possibly) reduces work on the server to render all the information but should make it simpler for folks using static sites as they then don't need to render everything for q=source compared to calls for q=source&url=...
Servers should at least have the option to return name, content, etc. It doesn't have to be required, but it is really important for any app that is showing a list of posts. Doing an extra query if you're showing a list of 100+ posts would be really wasteful.
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 audience is set to a particular URL?
Is anyone implementing queries like exists[] and not-exists[] in their systems? I don't see an independent ticket for it on here but I'm curious to see implementation approaches.
I have a tracking ticket for Koype for implementing exists[] and not-exists[]. I plan to use this in Lwa to highlight if a sort of reaction was made to an entry before (like, in a channel, a post has been liked, replied to or shared already) to prevent duplication of content.
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.
Good idea @jalcine. I feel like some of the older suggestions in this issue (like basic support for ?q=source to get the post list) are widely supported and stable. We should mark those as "done" and create new issues for any experimental extensions where there's no consensus yet.
Activity
EdwardHinkle commentedon Aug 9, 2018
Here are the notes about IndieWeb implementation from the brainstorming page:
EdwardHinkle commentedon Aug 9, 2018
@cleverdevil Post List Query discussion has moved here, for when you want to work on integrating into Known
EdwardHinkle commentedon Aug 9, 2018
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.
EdwardHinkle commentedon Aug 9, 2018
It probably makes sense to include the limit parameter from Microsub as well. So that would put us at:
https://example.tld/micropub?q=sourceAs already included in the original spec:
grantcodes commentedon Aug 10, 2018
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
deleteparameter which can either specify just the property name to delete or the value to delete.In my mind there needs to be 2 types of queries on properties at least:
post-status = draftThis could get more complex, if you wanted to match an entire array (eg.
category = ['foo', 'bar']) or just contains the given parameterThere are also a number of others that may be worth having, but I am not so sure are as vital:
grantcodes commentedon Aug 10, 2018
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.
grantcodes commentedon Aug 12, 2018
I've updated my implementation so I support a bunch of new features expanding on what @EdwardHinkle already mentioned
When using
q=sourcethere is now a lot of other parameters available:post-type=type- Filters the returned posts to only posts that match the included post type. This would be a post type from the Post Type Discoveryafter=pagination token- Returns older posts (I just use page numbers for now)before=pagination token- Returns newer posts (I just use page numbers for now)limit=number- Limits the returned results by the number providedorder=reverse- Returns posts in a reverse orderexists[]=property name- Returns posts that include the given propertiesnot-exists[]=property name- Returns posts that do not include the given propertiesproperty-property-name=value- Returns posts that contain the given property value e.g.property-post-status=draftcleverdevil commentedon Sep 6, 2018
FYI, I have a local branch of Known that supports:
q=source&url=&limit=&offset=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
&post-typeparameter would be a bit difficult to implement in Known at this stage, because Known doesn't currently have any such notion. That said, a mechanism could be created that would map Known "Entity" types to post-types from the Post Type Discovery spec. I'd likely need direction from @benwerd and @mapkyca on how to do it.grantcodes commentedon Sep 9, 2018
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
EdwardHinkle commentedon Sep 9, 2018
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:
swentel commentedon Sep 16, 2018
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!
swentel commentedon Sep 21, 2018
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.
grantcodes commentedon Oct 15, 2018
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):
post-status = draftBut drafts are not defined by post type discovery at the moment. So at the moment to get a list of drafts there would either need to be apost-type=draftquery or the client and server would both need to supportproperty-post-status=draft.post-status=privateandcategory=journal. If I wanted to expose these to a micropub client I would likely need to make my own custom post type.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
EdwardHinkle commentedon Oct 15, 2018
@grantcodes it looks like half your post is missing because you only mention 1 use case
grantcodes commentedon Oct 15, 2018
@EdwardHinkle Yeah, published early by accident, updated now.
21 remaining items
jamietanna commentedon Jul 11, 2020
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
nulls were found.(Originally published at: https://www.jvt.me/mf2/2020/07/sm4ec/)
jalcine commentedon Jul 18, 2020
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
typenow as well to determineh-entry,h-x-pageandh-x-category(the latter being custom for reasons).(Originally published at: https://v2.jacky.wtf/post/ef485fa8-33af-4f02-8844-572373a4fd74)
manton commentedon Jul 25, 2020
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
content,published, andurl. The URL will be needed for editing.jamietanna commentedon Jul 25, 2020
I'd prefer to keep it as a fairly minimal list, maybe even just the
type,uidandurl, and then require a follow-up call toq=source&url=...if a given post is required. This (possibly) reduces work on the server to render all the information but should make it simpler for folks using static sites as they then don't need to render everything forq=sourcecompared to calls forq=source&url=...manton commentedon Jul 25, 2020
Servers should at least have the option to return
name,content, etc. It doesn't have to be required, but it is really important for any app that is showing a list of posts. Doing an extra query if you're showing a list of 100+ posts would be really wasteful.jamietanna commentedon Jul 25, 2020
That's fair enough - if we can clarify that they're not required properties, then that'd allow clients to be built more resiliently 👍
jalcine commentedon Jun 24, 2021
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
audienceis set to a particular URL?jalcine commentedon Feb 6, 2022
Is anyone implementing queries like
exists[]andnot-exists[]in their systems? I don't see an independent ticket for it on here but I'm curious to see implementation approaches.jalcine commentedon Mar 14, 2022
I have a tracking ticket for Koype for implementing
exists[]andnot-exists[]. I plan to use this in Lwa to highlight if a sort of reaction was made to an entry before (like, in a channel, a post has been liked, replied to or shared already) to prevent duplication of content.jalcine commentedon Jul 3, 2022
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)
manton commentedon Jul 4, 2022
Good idea @jalcine. I feel like some of the older suggestions in this issue (like basic support for
?q=sourceto get the post list) are widely supported and stable. We should mark those as "done" and create new issues for any experimental extensions where there's no consensus yet.dshanske commentedon Jul 4, 2022
@jalcine @manton Eddie has been busy with life...I can take a run at it...I split off some things in the past
dshanske commentedon Jul 5, 2022
Issue closed as remaining sub-topics now split into separate issues.
manton commentedon Jul 5, 2022
Thanks @dshanske!