Charcoal-SE / metasmoke

Web dashboard for SmokeDetector.
https://metasmoke.erwaysoftware.com
Creative Commons Zero v1.0 Universal
43 stars 34 forks source link

FR: include autoflagging weight in Metasmoke JSON search result #224

Closed tripleee closed 7 years ago

tripleee commented 7 years ago

The JSON blob I get back from something like https://metasmoke.erwaysoftware.com/search.json?body=pcsupremo.com does not include the autoflagging weight of each hit. This would be nice to obtain; it is displayed for each post in the corresponding interactive (non-JSON) search result https://metasmoke.erwaysoftware.com/search?body=pcsupremo.com

tripleee commented 7 years ago

If adding this to the existing schema is challenging, at least offer some way of obtaining this information programmatically.

tripleee commented 7 years ago

The /posts/:id API call includes a reason_weight member for each item. I'm happy with this, but leaving this open for now in case we would like to document this in more detail somewhere.

ArtOfCode- commented 7 years ago

Because of views, the API returns posts with a bunch of extra detail, like reason weight. The interface, and JSON alternatives to the interface like search.json, don't.

There's a slightly tamer version of search available in the API, which you can use if it has enough criteria for you in the meantime.

tripleee commented 7 years ago

I'm planning to update the /posts/:id documentation in the wiki to reflect what this interface actually currently returns. I was scouring the API wiki pages over the weekend and couldn't find the reason weight anywhere, but there are apparently several other things which have changed since December. Anyway, if you have other or different plans, maybe we should coordinate here.

ArtOfCode- commented 7 years ago

No plans on that front. I just haven't updated the docs in a long time. There's a bunch of undocumented routes, and another, bigger bunch of routes whose behaviour has changed or that now return extra data, all undocumented.

tripleee commented 7 years ago

I updated the API doco now. Just this particular page, no review of the rest of the API documentation wiki at this point. I'll create a separate ticket about that.

tripleee commented 7 years ago

New ticket: https://github.com/Charcoal-SE/metasmoke/issues/226