whim icon indicating copy to clipboard operation
whim copied to clipboard

Queries should return JSON

Open jmacdotorg opened this issue 5 years ago • 2 comments

The query subcommand should be able to output JSON.

This JSON should be compatible with webmention.io's JSON output, such that a piece of software able to parse and display things from webmention.io should be able to treat output from Brisote in the same way.

The output can contain additional fields particular to Brisote.

I think that this should be the default behavior of query, relegating human-readable, plain-text output to the use of an -h flag or the like.

jmacdotorg avatar May 16 '20 17:05 jmacdotorg

Note fields that are in the webmention.io JSON not present in Whim's storage. (This is based on a read of webmention.io's homepage and README, and more could be gleaned from experimental usage, digging through the code, and and asking Aaron about it.)

  • wm-id: An integer that I take to be this webmention's primary key in webmention.io's internal database? Notable because currently Whim's database doesn't have any keys at all in it! I just created issue #21 to address this.

  • published: The API suggests that this is extracted from the source doc if defined by certain microformats, and falls back to the time received otherwise.

  • updated: "The updated date of the page, as seen by webmention.io (not the date the post reports in its microformats data)."

  • wm-private: Mysterious.

  • mention-of: In examples, used instead of "target". Does this field change if e.g. this is a like instead of a plain mention?

jmacdotorg avatar May 25 '20 15:05 jmacdotorg

I am removing this from the first public release milestone.

It's a feature worth adding, but with the whim display feature's earlier arrival, I realize that I don't care very much about this. So I don't wanna consider it a blocker.

jmacdotorg avatar May 25 '20 16:05 jmacdotorg