My Path to front-end learning: Medium Stats Insights version 1.1.2

Some updates have been made to Medium Stats Insights.

This is the whole point of technology. It creates an appetite for immortality on the one hand. It threatens universal extinction on the other. Technology is lust removed from nature.
— Don DeLillo

Medium Link:My Path to front-end learning: Medium Stats Insights version 1.1.2 | by Wesley Wei | May, 2024 | Programmer’s Career

Improvement points:

  1. Eliminated the logic for retrieving all articles and improved the loading time from minute-level to second-level for page load times.
  2. Removed views data:
    a. The official Medium API has discontinued the https://medium.com/me/stats/total/startTime/endTime endpoint, making it impossible to retrieve view-related data.
    b. Based on feedback, views data is not entirely accurate.
  3. Added a top 10 stories source analysis to the dashboard. Currently, my article data only includes these five sources. If there are any omissions, please let me know.
    image.png

Why

Maintaining and optimizing this plugin is a learning and experimentation process.

Just like the article How to get your stats on Medium: try Medium Stats Insights extension | by Wesley Wei | Apr, 2024 | Programmer’s Career explains, I maintain this plugin for two reasons:

  1. To learn from scratch and acquire some front-end knowledge, striving to become a full-stack engineer.
  2. To have some summarized and analyzed data that helps me better understand my Medium articles’ situation.

While these things have already been done by Medium users, and are quite popular, this plugin’s prototype came from the GitHub - HcwXd/better-medium-stats: A chrome extension that helps writers on Medium get more insights from the stats project. However, that plugin is no longer functional, and I developed the medium-stats-insights plugin with learning in mind and based on my requirements.
image.png
Of course, while developing this plugin, I also maintained communication with the original author because the initial code and the author’s project still have significant similarities. However, after that, I will continue to improve and use new front-end technologies, making this project unique and open-source.

Disclaimer and Suggestions

Some reminders

Firstly, the code repository for this plugin is located at GitHub - tfrain/medium-stats-insights: Get insights into your Medium stats, and it will not collect user data. This plugin is solely for learning purposes.

The plugin primarily sources its data from two places:

  1. An unofficial JSON data API
  2. A simple GraphQL data API that users also request

You can see that these two methods for requesting data may be blocked by Medium at any time, just like the views retrieval API that was recently blocked.

Ultimately, this is because Medium currently does not have a developer-friendly ecosystem like Facebook and Twitter, and Medium’s developers, like me, typically obtains usable data API through packet capture and other methods.

This primitive approach is not developer-friendly, and it is also not stable for users. I hope Medium will eventually provide more official and stable interfaces instead of requiring developers to explore them themselves.

Next Steps

As mentioned earlier, in the next stage, I will make further changes, including switching to a new technology stack using TypeScript, among other things.

During this rebuilding process, I welcome any additional suggestions from you. Perhaps we can complete it together. Anyway, this article is not just a changelog, but rather an explanation of my learning process, which is the most important thing.

I would like to thank huzhou for his suggestions and his review for this extension at chrome store. I hope you try this plugin too :).

中文文章: https://programmerscareer.com/zh-cn/medium-extension-1-1-2/
Author: Wesley Wei – Twitter Wesley Wei – Medium
Note: If you choose to repost or use this article, please cite the original source.

Flag Library You Should Know in Golang Go Basic: Understanding HTTP Client, HTTP Server, Context, Processes, Signals, Exit in Go

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×