Mikael Berthe is a user on mamot.fr. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

@McKael strange question: given a particular status URL (mamot.fr/@McKael/3085413 for example), how can I get the status-id? is that even concievable?

@wxl I think that's what the search API is supposed to do:
madonctl search "mamot.fr/@McKael/3085413"
madonctl search "soc.ialis.me/users/wxl/updates"
both work for me.

@wxl So I guess if you want to get the ID something like this might work:
madonctl search "$URL" --template '{{with index .statuses 0}}{{printf "%.0f" .id}}{{end}}'

@McKael i've been racking my brain about this. explain the index to me. i would expect statuses[0] to be the default, but it doesn't work without it.

Mikael Berthe @McKael

@wxl Sorry I don't get it--without what?

· Web · 0 · 0

@wxl The search call returns "Results" which contain a list of statuses (and a list of accounts).

See:
github.com/tootsuite/documenta

So you have to explicitly take the first item of the status list, in this case.

Hope that helps...

@McKael ah now it makes sense. since i've been looking at things that really only have one result, it was a little confusing. now i get it, thanks. :)