Skip to content
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

Add Sourceforge download stats badge #231

Closed
cxong opened this issue Aug 7, 2014 · 4 comments · Fixed by #303
Closed

Add Sourceforge download stats badge #231

cxong opened this issue Aug 7, 2014 · 4 comments · Fixed by #303

Comments

@cxong
Copy link

cxong commented Aug 7, 2014

Sourceforge includes a JSON API for collecting download stats. The syntax is:

sourceforge.net/projects/<project name>/files/<optional path to file/folder>/stats/json?start_date=<YYYY-MM-DD>&end_date=<YYYY-MM-DD>

Here's a sample query and output:

http://sourceforge.net/projects/c-dogs-sdl/files/stats/json?start_date=2014-08-06&end_date=2014-08-06

{"oses": [["Macintosh", 4], ["Unknown", 3], ["Windows", 1]], "end_date": "2014-08-06 00:00:00", "countries": [["Zimbabwe", 5], ["Ukraine", 1], ["Sweden", 1], ["India", 1]], "oses_with_downloads": ["Macintosh", "Unknown", "Windows"], "downloads": [["2014-08-06 00:00:00", 8]], "messages": [], "period": "daily", "start_date": "2014-08-06 00:00:00", "oses_by_country": {"Ukraine": {"Unknown": 1}, "Sweden": {"Windows": 1}, "Zimbabwe": {"Unknown": 1, "Macintosh": 4}, "India": {"Unknown": 1}}, "total": 8, "stats_updated": "2014-08-06 23:59:59", "summaries": {"os": {"top": "Macintosh", "percent": 50, "modifier_text": ""}, "geo": {"top": "Zimbabwe", "percent": 62, "modifier_text": ""}, "time": {"downloads": 8}}}
brondsem added a commit to brondsem/shields that referenced this issue Nov 6, 2014
brondsem added a commit to brondsem/shields that referenced this issue Nov 9, 2014
@cxong
Copy link
Author

cxong commented Nov 11, 2014

👍

@amanuel2
Copy link

@brondsem
Copy link
Contributor

@amanuel2 on your SourceForge project, go to the Admin page, then "Buttons & Badges" and it has example code you can copy & paste.

@amanuel2
Copy link

Thanks @brondsem !

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 a pull request may close this issue.

3 participants