superdesk / newsroom

Superdesk Newshub a.k.a. Newsroom
https://www.superdesk.org/news/superdesk-newshub
GNU General Public License v3.0
23 stars 31 forks source link

syndicate API including currently RSS and ATOM formatter API #1188

Open rbi-aap opened 5 months ago

rbi-aap commented 5 months ago

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

marwoodandrew commented 5 months ago

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!

MarkLark86 commented 5 months ago

@rbi-aap @marwoodandrew Is there a Jira ticket (in the SDAN project) with details?

marwoodandrew commented 5 months ago

@rbi-aap @marwoodandrew Is there a Jira ticket (in the SDAN project) with details?

No he doesn't my bad! I'll create one!

marwoodandrew commented 5 months ago

@rbi-aap, @MarkLark86 I've created SDAN-727 I think covers what we're trying to achieve.

MarkLark86 commented 5 months ago

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

MarkLark86 commented 5 months ago

Also, it might be good to avoid that after_request handling and place in another blueprint if you can, which in tern uses the get_internal function from Eve. If need be, you can create a a small Resource/Service to specifically handle the request params etc, but leave the handling for formatting to the blueprint view itself

rbi-aap commented 4 months ago

Hi Mark,

I apologize for the delay in providing the update. I was assigned to address other urgent matters.

As requested, i have retained the business-related functionalities for better custom experiences and functions , Thank you for your understanding and review.

rbi-aap commented 3 months ago

Hi Team, can you please review PR and also there is an issue in the pip install for "ERROR :could not find a version the satisfies the requirement celery <4.4,>=4.3.0" can we update this version, much appreciate the support and review.

marwoodandrew commented 3 months ago

Hi Team, can you please review PR and also there is an issue in the pip install for "ERROR :could not find a version the satisfies the requirement celery <4.4,>=4.3.0" can we update this version, much appreciate the support and review.

Yep, see https://github.com/superdesk/superdesk-aap/pull/937#issuecomment-2185387340

Going to be a challenge as we point to hotfix/1.33.17 for Superdesk Core

marwoodandrew commented 3 months ago

@rbi-aap you got some flake8 errors on the pyhton 3.6 build!

./newsroom/companies/views.py:182:75: F821 undefined name 'e' ./newsroom/wire/search.py:546:121: E501 line too long (122 > 120 characters) ./newsroom/wire/search.py:557:121: E501 line too long (132 > 120 characters) ./newsroom/wire/search.py:571:121: E501 line too long (124 > 120 characters) ./newsroom/wire/views.py:28:121: E501 line too long (138 > 120 characters) ./newsroom/wire/views.py:207:71: E203 whitespace before ',' ./newsroom/wire/block_media/download_items.py:70:121: E501 line too long (124 > 120 characters) ./newsroom/wire/block_media/filter_media.py:96:121: E501 line too long (123 > 120 characters)

rbi-aap commented 3 months ago

Hi Team

I find the server CI/server-py-36 stop works and can you please get it work, the error is below

Run docker-compose -f .actions-docker-compose.yml up -d docker-compose -f .actions-docker-compose.yml up -d shell: /usr/bin/bash -e {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.6.15/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.6.15/x64/lib /home/runner/work/_temp/120e7a2f-d8b2-4e3d-85be-e2f92ef70036.sh: line 1: docker-compose: command not found Error: Process completed with exit code 127.

As team wants quickly finalise this PR, thanks

rbi-aap commented 2 months ago

Hi Team, Can you please review the PR ? please let me know what else i need to add it the new start ticket is https://sofab.atlassian.net/browse/SDAN-732, thanks