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

Added Service for Auto Discovery of Feeds for URLs #1833

Merged
merged 1 commit into from Mar 14, 2021

Conversation

tonyvugithub
Copy link
Contributor

@tonyvugithub tonyvugithub commented Feb 26, 2021

Issue This PR Addresses

Fixed #1645

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

Followed the layout of image microservice to add the feed discovery service. The service will return a list of potential feed urls if the user provided a valid blog url

Checklist

image

Unit Tests
image
image

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@tonyvugithub
Copy link
Contributor Author

tonyvugithub commented Feb 26, 2021

Right now for all the well-known blog providers this works perfectly. Some edge cases like personal website blog like https://alexwang.ca/feed the service cannot discover the feed url. I think he did a redirect from his page to wordpress, so if he provided the wordpress link then the service would work perfectly.

@chrispinkney
Copy link
Contributor

Hello! What do you think about adding some tests? These tests can ensure that the service works in case changes ever need to be made, or more likely, the blog provider changes exactly how an RSS feed is created created on their end.

chrispinkney
chrispinkney previously approved these changes Mar 12, 2021
Copy link
Contributor

@chrispinkney chrispinkney left a comment

Choose a reason for hiding this comment

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

Postman_2021-03-12_18-01-15

Nice work man. Just tested this via Docker and it LGTM. Would love to see what others think too.

Do you have any intention of adding some sort of logging (via Satellite's Logger) somewhere? Might help if an issue goes wrong. Might not be necessary though since you're at least returning 400 and an error message.

Postman_2021-03-12_18-09-19

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Nice. A few more tests are needed, but it's close.

src/api/feed-discovery/test/router.test.js Outdated Show resolved Hide resolved
src/api/feed-discovery/test/router.test.js Outdated Show resolved Hide resolved
src/api/feed-discovery/test/router.test.js Outdated Show resolved Hide resolved
@tonyvugithub
Copy link
Contributor Author

@chrispinkney : I don't think it's necessary since the return json is self explanatory if something went wrong

chrispinkney
chrispinkney previously approved these changes Mar 13, 2021
src/api/feed-discovery/test/router.test.js Outdated Show resolved Hide resolved
src/api/feed-discovery/test/router.test.js Outdated Show resolved Hide resolved
src/api/feed-discovery/test/router.test.js Outdated Show resolved Hide resolved
src/api/feed-discovery/test/router.test.js Outdated Show resolved Hide resolved
humphd
humphd previously approved these changes Mar 13, 2021
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Well done.

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

A few small style things, and this is ready. So cool to have this. Can't wait to hook it up to the sign in flow.

src/api/feed-discovery/test/lib.test.js Outdated Show resolved Hide resolved
src/api/feed-discovery/test/lib.test.js Outdated Show resolved Hide resolved
src/api/feed-discovery/test/lib.test.js Outdated Show resolved Hide resolved
@tonyvugithub tonyvugithub merged commit 623e888 into Seneca-CDOT:master Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Service for Auto discovery of Feeds for URLs
4 participants