github-readme-stats icon indicating copy to clipboard operation
github-readme-stats copied to clipboard

Can`t find wakaTime data

Open shaoxiongdu opened this issue 3 years ago • 12 comments

**Describe the bug** The user name is set in wakatime, as shown in the figure below

imageUrlOnline The corresponding API request interface is set in the readme file of GitHub https://github-readme-stats.vercel.app/api/wakatime?&username=shaoxiongdu&compact=layout

But [no coding activity this week] is always displayed

Actually, there are, as shown in the figure below

imageUrlOnline

Thank you so much!

shaoxiongdu avatar Jun 04 '21 09:06 shaoxiongdu

Have you checked the option "Display languages, editors, os, categories publicly" at https://wakatime.com/settings/profile ? Because on your public profile (https://wakatime.com/@shaoxiongdu) the coding time is available but no languages are listed..

florianbussmann avatar Jun 04 '21 13:06 florianbussmann

thank you ! is ok

shaoxiongdu avatar Jun 07 '21 05:06 shaoxiongdu

In my case, the statistics have not been updated for a week

Muhammadyusuf96 avatar Jun 14 '21 10:06 Muhammadyusuf96

I seem to be having strange issues with this, probably related.

Here are all the URLs I tried

URL Status
https://github-readme-stats.vercel.app/api/wakatime?username=nemchik&theme=dark&layout=compact&range=last_7_days does not work
https://github-readme-stats.vercel.app/api/wakatime?username=nemchik&theme=dark&layout=compact half working?
https://github-readme-stats.vercel.app/api/wakatime?username=nemchik&theme=dark works
https://github-readme-stats.vercel.app/api/wakatime?username=nemchik works
- -
https://github-readme-stats.vercel.app/api/wakatime?username=@nemchik&theme=dark&layout=compact&range=last_7_days does not work
https://github-readme-stats.vercel.app/api/wakatime?username=@nemchik&theme=dark&layout=compact works
https://github-readme-stats.vercel.app/api/wakatime?username=@nemchik&theme=dark works
https://github-readme-stats.vercel.app/api/wakatime?username=@nemchik works

It's odd that the @ in the username makes a difference for one of the links.

Edit: I should also note my wakatime profile settings image and my wakatime profile url https://wakatime.com/@nemchik

nemchik avatar Jun 14 '21 21:06 nemchik

I tried the above but it seems like my wakatime is still not being updated? The only time I manage to update it is when I change the link.

Kalsyc avatar Jun 15 '21 01:06 Kalsyc

@Muhammadyusuf96 @nemchik @Kalsyc Could you try changing Display code time publicly to Last 7 Days at https://wakatime.com/settings/profile? The wakatime card should then update every 4 hours or whatever timerange you specify in the card parameter cache_seconds.

@nemchik specifying last_7_days (https://github-readme-stats.vercel.app/api/wakatime?username=nemchik&theme=dark&layout=compact&range=last_7_days) does not work because wakatime returns {"error":"Forbidden"} at https://wakatime.com/api/v1/users/muhammadyusuf96/stats/last_7_days The same error occurs on the other profiles that reported issues with stats that are not up to date. It should be resolved if you change the privacy setting to Last 7 Days

florianbussmann avatar Jun 15 '21 18:06 florianbussmann

After changing Display code time publicly to Last 7 Days at https://wakatime.com/settings/profile it seems all of the URLs in the table I originally posted work correctly (including the ones with the range=last_7_days URL parameter). https://wakatime.com/api/v1/users/nemchik/stats/last_7_days also works.

If I set it back to All Time the API URL breaks. The image links from my table don't break, but I'm guessing that might be something to do with caching.

Is this a bug with the wakatime API? I would think I should be able to set All Time but still request last_7_days from the API?

Additional thought: If I set Display code time publicly to Last 7 Days then the range=last_7_days URL parameter should not be needed, because only the last 7 days would be shared by the API anyway.

nemchik avatar Jun 15 '21 18:06 nemchik

Is this a bug with the wakatime API? I would think I should be able to set All Time but still request last_7_days from the API?

I don't think this is a bug, but it may be a limitation of the free plan of wakatime. The selected time range also seems to affect the caching on wakatimes end: For accounts subscribed to the free plan, time ranges >= one year are updated on the first request. It’s best to always check is_up_to_date and retry your request when the response is stale. (https://wakatime.com/developers#stats)

Additional thought: If I set Display code time publicly to Last 7 Days then the range=last_7_days URL parameter should not be needed, because only the last 7 days would be shared by the API anyway.

Thats true. I think the parameter range is only interesting for users with a paid membersip or a self-hosted instance of wakatime, because the allowed values last_7_days, last_30_days, last_6_months, or last_year all return Forbidden unless you change the option Display code time publicly beforehand, but some of them aren't even provided in the dropdown.

florianbussmann avatar Jun 15 '21 19:06 florianbussmann

That makes sense. I was unaware that free/paid affected this. My account with wakatime is only a few days old at this point (started using it because of the widget in this repo).

Maybe it would be beneficial if the readme included some information about this?

nemchik avatar Jun 15 '21 19:06 nemchik

@Muhammadyusuf96 @nemchik @Kalsyc Could you try changing Display code time publicly to Last 7 Days at https://wakatime.com/settings/profile? The wakatime card should then update every 4 hours or whatever timerange you specify in the card parameter cache_seconds.

@nemchik specifying last_7_days (https://github-readme-stats.vercel.app/api/wakatime?username=nemchik&theme=dark&layout=compact&range=last_7_days) does not work because wakatime returns {"error":"Forbidden"} at https://wakatime.com/api/v1/users/muhammadyusuf96/stats/last_7_days The same error occurs on the other profiles that reported issues with stats that are not up to date. It should be resolved if you change the privacy setting to Last 7 Days

Yes, it seems like that updated instantly once I changed the setting to Last 7 Days on my profile. Thanks for the help!

Kalsyc avatar Jun 16 '21 02:06 Kalsyc

@florianbussmann Prior to my comment here, was tuned in for "Last 7 Days". An hour later, in my opinion, changed to "All time". But then statistics was updated at evening.

Muhammadyusuf96 avatar Jun 16 '21 16:06 Muhammadyusuf96

I have the same problem

carepollo avatar Dec 19 '22 16:12 carepollo

Shaoxiongdu

@shaoxiongdu I can not reproduce.

Harlok's wakatime stats

Harlok's wakatime stats

Carepollo

@carepollo your profile doesn't appear to be public (see https://wakatime.com/@Carepollo).

Harlok's wakatime stats

Harlok's wakatime stats

rickstaa avatar May 06 '23 10:05 rickstaa

Shaoxiongdu

@shaoxiongdu I can not reproduce.

Harlok's wakatime stats

Harlok's wakatime stats

Carepollo

@carepollo your profile doesn't appear to be public (see https://wakatime.com/@Carepollo).

Harlok's wakatime stats

Harlok's wakatime stats

My username in wakatime is @chickenface

carepollo avatar May 06 '23 13:05 carepollo

Shaoxiongdu @shaoxiongdu I can not reproduce. Harlok's wakatime stats Harlok's wakatime stats Carepollo @carepollo your profile doesn't appear to be public (see https://wakatime.com/@Carepollo). Harlok's wakatime stats Harlok's wakatime stats

My username in wakatime is @ChickenFace

Thanks! Your problem will be resolved when https://github.com/anuraghazra/github-readme-stats/pull/2707 is merged!

rickstaa avatar May 08 '23 07:05 rickstaa

Shaoxiongdu @shaoxiongdu I can not reproduce. Harlok's wakatime stats Harlok's wakatime stats Carepollo @carepollo your profile doesn't appear to be public (see https://wakatime.com/@Carepollo). Harlok's wakatime stats Harlok's wakatime stats

My username in wakatime is @ChickenFace

Thanks! Your problem will be resolved when https://github.com/anuraghazra/github-readme-stats/pull/2707 is merged!

rickstaa avatar May 08 '23 07:05 rickstaa