oharaandrew314 / TinkerTime

NO LONGER SUPPORTED - The Ultimate KSP Mod Mechanic
http://andrewohara.io/TinkerTime
GNU General Public License v3.0
26 stars 8 forks source link

Have Tinker Time Updater use KerbalStuff rather than Github #147

Closed oharaandrew314 closed 9 years ago

oharaandrew314 commented 9 years ago

This way, I can track the number of downloads better.

dmarcuse commented 9 years ago

You can see downloads for each release asset individually via the GitHub developer API. For example: https://api.github.com/repos/oharaandrew314/TinkerTime/releases

Turns out there's currently 53 downloads for version 1.0.

oharaandrew314 commented 9 years ago

Cool. I was hoping for a lot more, though. :P

oharaandrew314 commented 9 years ago

Do you, off the top of your head, know whether it's possible to use the API unauthenticated to download releases and get their metadata?

If you don't know off the top of your head, I'll just research it.

dmarcuse commented 9 years ago

Yes. Check that link from the above post. You will have a heavy maximum request quota however. I believe it's 60 per hour unauthenticated.

oharaandrew314 commented 9 years ago

Ah, right. I asked the question before I figured out what it was I really needed. I had only heard of the Enterprise API before this, which requires a token that I would not put in Tinker Time.

I think it may be worth switching the Github Crawler over to use this API, rather than crawling the HTML. I'll add this to your #141 issue, since it would be wasteful to modify the crawler and then change its implementation.

dmarcuse commented 9 years ago

Oh... I literally just finished the new crawler changes and was about to make a PR until I saw this. Still want it, or should I scrap it and switch to the API? Personally I'd make it optional to use the API since it has a limit (although it's unlikely the users will hit it) and crawl the HTML by default (or as a last resort if the API is already maxed out). Why fix it if it isn't broken, eh?

oharaandrew314 commented 9 years ago

Oh well. Just send it to me.

I figured using an API always beats crawling HTML, which changes more often.

oharaandrew314 commented 9 years ago

I made a script to count total downloads. 2800 in total! :D