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

Add representation of search results as Atom feeds #1275

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

niklasl
Copy link
Member

@niklasl niklasl commented Jun 16, 2023

No description provided.

@niklasl niklasl requested a review from olovy June 16, 2023 09:03
@niklasl niklasl force-pushed the feature/change-feeds branch 2 times, most recently from fdbb435 to d8ad065 Compare June 27, 2023 15:20
@niklasl niklasl marked this pull request as ready for review July 12, 2023 10:25
Copy link
Contributor

@olovy olovy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

We can adjust the content format later.

Comment on lines 267 to 273
if (!(request.getContentType() in [MimeTypes.JSON, MimeTypes.JSONLD])) {
data[JsonLd.CONTEXT_KEY] = contextData
if ((request.getContentType() in [MimeTypes.ATOM])) {
var feedId = getFeedId(data, uri)
return searchFeed.represent(feedId, data)
}
return converterUtils.convert(data, uri, request.getContentType())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(request.getContentType() in [MimeTypes.JSON, MimeTypes.JSONLD])) {
data[JsonLd.CONTEXT_KEY] = contextData
if ((request.getContentType() in [MimeTypes.ATOM])) {
var feedId = getFeedId(data, uri)
return searchFeed.represent(feedId, data)
}
return converterUtils.convert(data, uri, request.getContentType())
if ((request.getContentType() in [MimeTypes.ATOM])) {
data[JsonLd.CONTEXT_KEY] = contextData
var feedId = getFeedId(data, uri)
return searchFeed.represent(feedId, data)
}
else if (!(request.getContentType() in [MimeTypes.JSON, MimeTypes.JSONLD])) {
data[JsonLd.CONTEXT_KEY] = contextData
return converterUtils.convert(data, uri, request.getContentType())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants