Skip to content

Fixes #196- Fetching articles from Medium #197

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

Merged
merged 4 commits into from
Mar 7, 2020

Conversation

AuraOfDivinity
Copy link
Collaborator

**Fixes #196 **

The medium API is write only and doesn't offer any api endpoint to fetch posts of a given user. The only endpoint that does the job (i.e user/{userID}/publications) requires an auth token(which can be obtained by emailing medium) and returns all the publications including publications that the user has written, is editing and subscribed to . The returned response doesn't offer a way to distinguish posts between the ones the user has written and the ones the user has subscribed to. (https://github.com/Medium/medium-api-docs)

The workaround for this is to run a separate small webserver to fetch the RSS feed of a given user and converting it to a JSON response. I created a simple server to do the above task here.

Screenshots
Peek 2020-02-19 12-33

@jaskirat2000 Would like to know your thoughts on this.

@jaskiratsingh2000
Copy link
Member

Hi @AuraOfDivinity this looks good to me. So now it should automatically showcase all the latest blogs from the medium.
Can you make it look this way? In a single row.
20200219_124308

I am tagging @devesh-verma and @ayushnagar123 to have their point of view what they think about it. Cc @Rupeshiya

Copy link
Member

@Rupeshiya Rupeshiya left a comment

Choose a reason for hiding this comment

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

@AuraOfDivinity Everything else in implementation looks good to me.
Also please improve the UI as suggested by @jaskirat2000 and instead of rendering all the blogs in home page, render at max 3-posts in home page and give a "Read more" button at last which will redirect to the blogs component where all the blogs should be rendered one by one and on clicking any one of the blog it will render single blog contents.

cc @devesh-verma @vaibhavdaren please review.


componentDidMount() {
let activities = [];
fetch("https://medium-article-fetcher.herokuapp.com/posts", {
Copy link
Member

Choose a reason for hiding this comment

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

@AuraOfDivinity I don't think this will be best solution for implementing this feature, you are making the whole functionality dependent on the other codebase which is not owned by the org.
We should find other workaround to implement this functionality by keeping this in mind that we don't want to increace the dependencies.

Copy link
Member

Choose a reason for hiding this comment

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

api server we will find a workaround in sometime.

@AuraOfDivinity
Copy link
Collaborator Author

@jaskirat2000 @Rupeshiya Thanks for the feedback. I have made the requested changes.
196

@Rupeshiya Totally agree with you on your concern of data fetching part being dependant on another codebase not owned by the org. Do you have any suggestions to resolve this issue?

Copy link
Member

@Rupeshiya Rupeshiya left a comment

Choose a reason for hiding this comment

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

@AuraOfDivinity You are showing first three posts in the home page that's good, also add a "Read more" button just below the three posts row which will redirect to the component where all the posts will be rendered similar as you shown in the home page but on clicking the single post of medium the single post content will be rendered .

Nice work @AuraOfDivinity.
cc @vaibhavdaren @jaskirat2000 please update him with your view

@jaskiratsingh2000
Copy link
Member

I agree on above. Go ahead. 😀✌

@AuraOfDivinity
Copy link
Collaborator Author

@jaskirat2000 @Rupeshiya I have made the requested changes. Please have a look and let me know if any more changes are required.

blogs

@vaibhavdaren
Copy link
Member

The modal that opens on read more looks funny. 🗡
@AuraOfDivinity Nice work !!! 💃

@vaibhavdaren
Copy link
Member

I think we can have a iframe in popup modal or we can go with redirect.

@Rupeshiya
Copy link
Member

yes @vaibhavdaren we can go with redirect option. But what about this #197 (comment)
Any solution??

@vaibhavdaren
Copy link
Member

Lets Go with redirect .

@Rupeshiya
Copy link
Member

@vaibhavdaren I am asking for the solution of #197 (comment)

@AuraOfDivinity
Copy link
Collaborator Author

I have removed the modal as requested. The users will be redirected medium now.

@Rupeshiya is asking whether or not it is a good idea to continue being dependant on the simple app I created to fetch the data about the medium articles. I would love to hear your opinion on this @vaibhavdaren

@vaibhavdaren
Copy link
Member

vaibhavdaren commented Feb 26, 2020

@Rupeshiya @AuraOfDivinity
There are associated Problems and Risks with third-party APIs
Despite many benefits, the use of third-party APIs does introduce risks and challenges for products.
Information Security
Encryption of critical information is essential to ensure safe usage of APIs by other vendors. Enterprises should independently implement their primary business and ensure the safety of sensitive customer information. Such information should never be transmitted through unencrypted channels. Furthermore, enterprises should avoid using APIs from unknown sources and implement secondary authentication for critical operations.
Stability
Performance
:) you can read more about it online

@AuraOfDivinity
Copy link
Collaborator Author

@vaibhavdaren Is anything else required from my end with regard to this issue?

@jaskiratsingh2000 jaskiratsingh2000 merged commit 116a674 into codeuino:development Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Displaying "latest Blogs" from the medium on the Home page.
5 participants