-
-
Notifications
You must be signed in to change notification settings - Fork 700
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
Plugin hook: actors_from_ids()
#2180
Comments
I think this is both a plugin hook and a |
I shipped the first version of When I land this plugin in a Datasette release I need to update that repo to depend on the new alpha. |
I've implemented this hook once now in: And built and tested a debug tool for it in: I'm now confident in the design of this plugin hook, I'm going to land it. |
In building Datasette Cloud we realized that a bunch of the features we are building need a way of resolving an actor ID to the actual actor, in order to display something more interesting than just an integer ID.
Social plugins in particular need this - comments by X, CSV uploaded by X, that kind of thing.
I think the solution is a new plugin hook:
actors_from_ids(datasette, ids)
which can return a list of actor dictionaries.The default implementation can return
[{"id": "..."}]
for the IDs passed to it.Pluggy has a
firstresult=True
option which is relevant here, since this is the first plugin hook we will have implemented where only one plugin should provide an answer.The text was updated successfully, but these errors were encountered: