Open nathanchu opened 3 years ago
@nthnchu Yeah i think it would be nicer to have a JSON API.
What i was thinking is that instead of creating separate routes we can also use query param to set the return type. we can be more flexible that way in future without needing to add more api routes and it would be much simpler too
example ->
https://github-readme-stats.vercel.app/api?username=anuraghazra&response_type=json
https://github-readme-stats.vercel.app/api?username=anuraghazra&response_type=xml
// defaults to rendered image
https://github-readme-stats.vercel.app/api?username=anuraghazra
I'd take this up, would be a useful feature to have within this tool. Great tool, btw!
@dopecodez I've been working on this some, but suggestions are welcome! Do you have any good json to xml library suggestions, by chance? #665
I've been using xml2js, which seems to be more popular. Do you know if this is faster or has any other advantages over xml2js?
Any update on this please ?
Is your feature request related to a problem? Please describe. It would be cool if there was a json api for each card.
Describe the solution you'd like For example
/api/json?username=nthnchu
would return:Yes, I know I could just fetch from the API, but this would simplify things if I wanted to include it on my site, but in a different layout.
Describe alternatives you've considered Using the GH api
Additional context N/A