-
Notifications
You must be signed in to change notification settings - Fork 31
use new AP resolve code from SearchController in SearchRetrieveApi #2013
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
Open
blued-gear
wants to merge
5
commits into
main
Choose a base branch
from
fix/api/unify-code-of-both-ap-searches
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5db735f
use new AP resolve code from SearchController in SearchRetrieveApi
blued-gear 3a5dd9a
Merge branch 'main' into fix/api/unify-code-of-both-ap-searches
blued-gear 572c3eb
change the search API for a more unified result schema and upgrade th…
blued-gear 41fa628
please the linter
blued-gear 1674294
disable tests which require web
blued-gear File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please give me some feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand what the change to the API is here. Doesn't the search API already return federated users and magazines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oddly enough no, not in the normal result items. Before my change it asserted, that the items can only be of
ContentInterfaceand the OpenAPI schema lists these contents:Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the API docs, it looks like there's an
apActorsproperty returned from/search, which can be either a user or a magazine. Then it looks like there's anapObjectsproperty which can be a thread, thread comment, microblog, or microblog comment.I'm obviously not looking at the code though, so maybe the API docs are incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are correct about the
itemsnot containing users or magazines. But the content of the returned object is a bit weird. As far as I understood it from the code theitemscontain content which matched by text,apActorscontain users and magazines fetched via searched handle or AP url andapObjectscontain content fetched via AP url.Honestly, I'm in favor to rework the whole search API to make it more consistent and easy to understand, but breaking an unversioned API is probably not the best idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, gotcha. Well, I'm fine keeping it how it is or changing it. It would be nice if the Mbin API were versioned. Considering it's not in wide use (that I know of), you could just make the breaking change, and we can fix Interstellar to work with the change afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the API to make it more consistent with other newer APIs we have. I still needed to keep one extra prop in the response for results of handle and url searches, as these are not paginated and so must be kept separately from
items.