Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Version Check via API?

A topic by Martin Nerurkar created Feb 19, 2018 Views: 2,514 Replies: 8
Viewing posts 1 to 7

So I'd love to add a version check to my game: That is an API call that allows me to check the version number in a channel and compare that to the version in the current build. Then I can alert people that don't use the itch.io app to update the game.

I've been looking at the API and had some troubles with the GET query parameters plus it seems there's no version information available.

Anyone ever solved this?

Admin(+1)

I was talking to you on twitter, but I can't help without seeing the HTTP request. Can you tell me which game you were trying to look it up for, I don't see your username in our access logs for the /latest endpoint

(1 edit)

wait, there's a latest endpoint? Did I miss that in the API documentation? 

(Just to be sure, I was looking at this: https://itch.io/docs/api/serverside)

What I did was set this up in unity zto try to get the game info to see if I could check for the channel version there. I could get the games for my account (parameterless) but not the purchases since that requires a parameter

I have no experience with GET requests so i was trying to add the parameter with ?name=value but that did not go through. Not sure why though. My current guess is that there needs to be some escaping done on the string?


I'm pretty sure it's because I don't know what i'm doing :)

Also, just to expand: My queries work when I paste them into my browser, I was probably having some unity specific issue. No idea what.

Regardless, I'm still unclear if the version check is possible at all. You mention the "/latest" endpoint but I can not find it in the documentation?

Admin

Looks like it's undocumented, you can use it to fetch the latest user version on a build uploaded by butler. 

Here's an example:

https://itch.io/api/1/x/wharf/latest?target=doborog/clonedroneinthedangerzone&ch...

Regarding the other error you're having, sounds like a encoding issue with the API you're using in Unity. Verify that the function doesn't take query parameters as separate object. Maybe the `?` is optional if query params are handled separately

This really should be documented...and I swear it was, because I found it somewhere to be able to build my version checking utility (itchy for lack of a better name).

I just found where it is documented, on butler's usage page: https://itch.io/docs/butler/pushing.html#looking-for-updates

awesome. That's exactly what I'm looking for! Thanks. 

And yeah, I'm sure it was me just not using the Unity thing properly since it works in the browser. This is less an API and more of an end user issue :D

Actually managed to get it to work! Thanks.