-
Notifications
You must be signed in to change notification settings - Fork 31
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
syndicate API including currently RSS and ATOM formatter API #1188
base: lockhart
Are you sure you want to change the base?
Conversation
Add the media icons (video, audio) to the home page dashboard display, article preview and article view.
…to audioAvailable
It maybe be nice to have some tests like those in newsroom/features/news_api_atom_features! particularly ensuring the product filtering on RSS works as expected! |
@rbi-aap @marwoodandrew Is there a Jira ticket (in the SDAN project) with details? |
No he doesn't my bad! I'll create one! |
@rbi-aap, @MarkLark86 I've created SDAN-727 I think covers what we're trying to achieve. |
@rbi-aap There's a lot of duplication of code. Could you please pull the RSS/ATOM feed formatting code into a common function, that can be used by both the existing blueprints and this new endpoint. |
Also, it might be good to avoid that |
…kage.json with new packages, and rebuilt Video API for custom experiences and big video
Hi Team, |
@@ -116,7 +116,17 @@ export function postCompany() { | |||
|
|||
}; | |||
} | |||
|
|||
export function savePermissions(company, permissions) { |
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.
The savePermissions
function was moved, but the original commented lines above it have not.
/** Save permissions for a company
*
*/
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.
update,
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.
This comment for /** Save permissions for a company
still is not in the correct place. Please fix the comment location so it is above the function it is referencing
from superdesk import get_resource_service | ||
|
||
|
||
class CompanyFactory: |
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.
Instead of creating your own caching mechanism, you can use existing cache that we're already using (which is also used in this version of newsroom). get_cached_resource_by_id.
Using the get_cached_resource_by_id means this entire module will no longer be needed
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.
temp keep it as it is a session level caching different to the [get_cached_resource_by_id], probably change it in the later version update to V2
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 don't understand the reason here. Why create a new caching mechanism when we already have one that is used in Production for a long time now, and proven to work. I'm not saying this won't work, but we have something robust and very thoroughly tested.
What benefit does having a session level cache vs an app/redis cache?
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.
The get_cached_resource_by_id can work for sure as it has approved, but please review below reasons for this use case. much appreciate your support
Moving from session-based to app-level caching in CompanyFactory would be a big code change and could cause problems.
Session caching keeps sensitive permission data safe in user sessions and gives more control over caching for each admin user different to normal user and its cache
The current setup works well and fits our needs, so it's probably better to stick with it than spend a lot of time changing things. as it is more than a general cache requirements,
thanks and regards
Please review, let me know if any further improvements are required, thanks
here is demo,
https://dev-newsroom.aap.com.au/api/v1/news/syndicate?formatter=atom&start_date=2024-05-20&products=61ba8a307ba0a51c1603c666,64b73fb739b7d303fde3a8cd