Closed dholms closed 1 year ago
@dholms ,
I found this in JSON returned by API.
For example, app.bsky.actor.search
returns JSON as follows:
{
"cursor": ".7777778::tezos.bsky.social",
"users": [
{
"did": "did:plc:ji4f2ypncqko5cm62pmyxh67",
"declaration": {
"actorType": "app.bsky.system.actorUser",
"cid": "bafyreid27zk7lbis4zw5fz4podbvbs4fc5ivwji3dmrwa6zggnj4bnd57u"
},
"handle": "tester.bsky.social",
"displayName": "tester",
"description": "testing account for apps",
"indexedAt": "2023-03-07T01:14:50.384Z",
"viewer": {
"muted": false,
"following": "at://did:plc:iijrtk7ocored6zuziwmqq3c/app.bsky.graph.follow/3jqdex7dcrt2q"
}
}
]
}
But another endpoint returns as follows:
{
"cursor": "235::did:plc:5trbo6ijzaizkszgcpvx7gnf",
"actors": [
{
"did": "did:plc:fjsmdevv3mmzc3dpd36u5yxc",
"declaration": {
"actorType": "app.bsky.system.actorUser",
"cid": "bafyreid27zk7lbis4zw5fz4podbvbs4fc5ivwji3dmrwa6zggnj4bnd57u"
},
"handle": "hnbot.bsky.social",
"viewer": { "muted": false }
}
]
}
The field names users
and actors
are different even though the structure appears to be the same.
Or, are User
and Actor
different objects?
Nope User
& Actor
are just unstandardrized values. You can see the standardization I'm doing here: https://github.com/bluesky-social/atproto/pull/655
The former returns a more detailed view than the latter
We use the
actor
param for some methods such asgetProfile
, but with others we call the paramuser
- such asgetFollows
&getFollowers
. We should standardize this on all methods