@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.

Follow

@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.

@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. :)

Sign in to participate in the conversation
La Quadrature du Net - Mastodon - Media Fédéré

Bienvenue dans le media fédéré de la Quadrature du Net association de défense des libertés. Les inscriptions sont ouvertes et libres.
Tout compte créé ici pourra a priori discuter avec l'ensemble des autres instances de Mastodon de la fédération, et sera visible sur les autres instances.
Nous maintiendrons cette instance sur le long terme.