Post ADibZu7IIizqPSS4Vk by pasture@sad.cab
(DIR) More posts by pasture@sad.cab
(DIR) Post #ADibP2F7kOmSQYvo8m by Zergling_man@birds.garden
2021-11-24T03:45:57.060778Z
0 likes, 4 repeats
Hey fedi's, is there a way to translate a username(@instance) to a user ID (local or remote) that doesn't involve scraping?
(DIR) Post #ADibZu7IIizqPSS4Vk by pasture@sad.cab
2021-11-24T07:08:27.512469Z
1 likes, 0 repeats
@Zergling_man mastodon search
(DIR) Post #ADibiWaV9NeY2gDwAq by Zergling_man@birds.garden
2021-11-24T07:09:59.919230Z
0 likes, 0 repeats
@pasture How do you access that, and what permissions does it require?
(DIR) Post #ADiby8pXFQqazchc00 by pasture@sad.cab
2021-11-24T07:12:50.028455Z
1 likes, 0 repeats
@Zergling_man normal user account, mastodon APIyour.instance.tld/api/v2/search?q=@pasture@pl.gamers.exposed&type=accounts&resolve=trueyou may need to set Authorization: Bearer (your-token) , you can get a token using a service like this takahashim.github.io/mastodon-access-token/
(DIR) Post #ADicQtlGLvrCehPsNk by pasture@sad.cab
2021-11-24T07:18:01.831603Z
1 likes, 0 repeats
@Zergling_man you can also webfinger and fetch an ActivityPub Person if you're just looking for user info and don't want to cache locallycurl pl.gamers.exposed/.well-known/webfinger?resource=acct:pasture@pl.gamers.exposed(should return <Link rel="application/activity+json" href="https://pl.gamers.exposed/users/pasture">)curl -H "Accept: application/activity+json" pl.gamers.exposed/users/pasture
(DIR) Post #ADid3M35d2eFOM5m9Q by Zergling_man@birds.garden
2021-11-24T07:24:58.107510Z
0 likes, 0 repeats
@pasture >(should return <Link rel="application/activity+json" href="https://pl.gamers.exposed/users/pasture">)It does not. It gives me a generic 301. Both those examples you posted do, actually. Is this because your instance is actually somewhere else?>"Accept: application/activity+json"Huh, that URL should be frontend? Does setting that turn it into a faux API page?>webfingerTeehee. Webfinger the websocks owner. ( ͡° ͜ʖ ͡°)Also somehow, despite combing over https://api.pleroma.social/ several times (but not recently, admittedly), I have never once seen the search endpoint, and it has three entries in a row relating to it...Does the webfinger actually include userid? As in, the same ID that other endpoints tend to ask for, like fetching user TLs.
(DIR) Post #ADih9ul3tRD4aw2jmS by pasture@sad.cab
2021-11-24T08:10:59.197350Z
1 likes, 0 repeats
@Zergling_man the https is hidden on links. it was probably an upgrade from HTTP to HTTPS.there are many ways to go about fetching timelines specifically1. fetch their timeline from your instance after searching (only works if that user's posts federate to your instance)2. try to query the mastodon API on their instance, but also requires mastodon or pleroma on their instance and may require an account on their instance3. query the user's outbox, which will be the "outbox" property on the person/actor. this "should" be the cleanest and most complete way of doing it and all public posts "should"? land in the outbox
(DIR) Post #ADihrPUfUjbgN67EAK by Zergling_man@birds.garden
2021-11-24T08:18:49.591333Z
0 likes, 0 repeats
@pasture >it was probably an upgrade from HTTP to HTTPS.ffs curl not following it. This shit is why I use wget... Good software is good defaulting.Anyway, I tend to solve the question of TL fetching by fetching my own and looking for relevant replies/favs/etc. :^)But despite this I am too dumb to keep a file of my own user IDs.I haven't encountered outboxes. They're fetched with the user's profile? 🤔 That doesn't seem right. Or do you mean /users/{id}/outbox?