Bug Description
The dev.to API integration has two issues:
1. Missing state=published parameter
The dev.to API requires state=published (or state=all) for per_page=1000 to work. Without it, only 30 articles are returned.
Current URL:
https://dev.to/api/articles?username=${username}&per_page=1000
Should be:
https://dev.to/api/articles?username=${username}&per_page=1000&state=published
2. Views not available from dev.to API
The dev.to public API does not return page_views_count for articles. The current code defaults to 0:
const totalViews = data.reduce((sum, article) => sum + (article.page_views_count ?? 0), 0);
This displays "0 views" which is misleading - it's not that the articles have 0 views, it's that views aren't exposed by the API.
Suggested fix: Only include totalViews in the response if the API actually returns page_views_count values > 0, or skip the views stat entirely for dev.to.
Impact
Users with more than 30 articles will see incomplete article counts. View counts will always show 0 even when articles have actual views.
Bug Description
The dev.to API integration has two issues:
1. Missing
state=publishedparameterThe dev.to API requires
state=published(orstate=all) forper_page=1000to work. Without it, only 30 articles are returned.Current URL:
Should be:
2. Views not available from dev.to API
The dev.to public API does not return
page_views_countfor articles. The current code defaults to 0:This displays "0 views" which is misleading - it's not that the articles have 0 views, it's that views aren't exposed by the API.
Suggested fix: Only include
totalViewsin the response if the API actually returnspage_views_countvalues > 0, or skip the views stat entirely for dev.to.Impact
Users with more than 30 articles will see incomplete article counts. View counts will always show 0 even when articles have actual views.