Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actor param on some methods, user on others #548

Closed
dholms opened this issue Feb 14, 2023 · 3 comments
Closed

actor param on some methods, user on others #548

dholms opened this issue Feb 14, 2023 · 3 comments

Comments

@dholms
Copy link
Collaborator

dholms commented Feb 14, 2023

We use the actor param for some methods such as getProfile, but with others we call the param user - such as getFollows & getFollowers. We should standardize this on all methods

@myConsciousness
Copy link
Contributor

myConsciousness commented Mar 14, 2023

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

@dholms
Copy link
Collaborator Author

dholms commented Mar 14, 2023

Nope User & Actor are just unstandardrized values. You can see the standardization I'm doing here: #655

The former returns a more detailed view than the latter

@dholms
Copy link
Collaborator Author

dholms commented Apr 4, 2023

fixed #658

@dholms dholms closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants