Ok no problem!
Thanks for the help
Hi leafo, quyse helped me for api part with Butlerd.
Everything works perfectly as long as I ask for the username/password of the user. If I try to use an OAuth api key I can’t see the uploads for example (api key does not permit `game:view:uploads’)
But asking for the username/password of a user in a random game would be really suspicious.. Is there any way to let the regular oauth api key see the uploads of a game ? Thanks!
Hi! Thanks for your response.
However it seems to not work… The data.json request is working properly I have access to the game_id however the /game/ request do not give the informations that you gave:
{
"game": {
"p_osx": true,
"id": 28768,
"published_at": "2015-06-21 12:11:55",
"url": "https:\\/\\/thorbjorn.itch.io\\/tiled",
"can_be_bought": true,
"p_android": false,
"p_linux": true,
"created_at": "2015-06-21 09:52:56",
"p_windows": true,
"has_demo": false,
"min_price": 0,
"title": "Tiled Map Editor",
"user": {
"display_name": "Thorbjørn",
"id": 59281,
"url": "https:\\/\\/thorbjorn.itch.io",
"cover_url": "https:\\/\\/img.itch.zone\\/aW1hZ2UyL3VzZXIvNTkyODEvMjE4NzA0LnBuZw==\\/100x100%23\\/kk5Ir6.png",
"username": "thorbjorn"
},
"cover_url": "https:\\/\\/img.itch.zone\\/aW1nLzI2NTU0MzAucG5n\\/315x250%23c\\/OviaCR.png",
"in_press_system": false,
"classification": "tool",
"short_text": "Free, easy to use and flexible level editor.",
"type": "default"
}
}
(I’ve tried with other games, it do not give any information about the uploads..)
and I’ve also tried your download request, and here it works I have the link. But as I said before how did you get the download id ? (the “504289” as I don’t have it in the /game/ request?)
Thanks for your help! It really helps me a lot!
Edit: And I’ve also tried to use an OAuth application api key but it do not work, so I don’t think this is the best solution (since the users would have to give their api key to the app, it’s a bit more annoying than just accepting the OAuth app..)
Hi! Thanks for your response. Yes I’ve found later on that the channel name was not good. (And by the way is there a command to get a list of all the channels names of an app ?)
So I’ve tried again with the correct channel name, and it’s exactly the same:
butler fetch thorbjorn/tiled:windows-64bit test
∙ Getting last build of channel windows-64bit
itch.io API error (400): /wharf/channels/windows-64bit: invalid game
But if it’s not the owner’s API key, which key should I use ? Because I’m trying to make a custom launcher in which the player connect with OAuth (and then he gives us it’s API key) but it do not work (do not have the right scope).
Edit: I’ve for the channels list: https://itch.io/api/1/APIKEY/wharf/channels?target=author/game (But this is only working for my own games, due to the api key I guess, so here how itch app can use it?)
Also I’ve looked into the itch app database (butler.db in the itch/db folder) and it is using one of my api key for butler. But when I use it myself with butler, with status,fetch commands they are not working (invalid target).
Thanks!
Ok my bad it was not in itch io app code but in butler. But another problem comes, I cannot manage to use the fetch command (command that downloads a game) here’s an example with a free game:
butler fetch thorbjorn/tiled:win test
∙ Getting last build of channel win
itch.io API error (400): /wharf/channels/win: invalid game
And I just always get that error (latest butler version)
Edit: Do we actually need to use the game’s owner api key to do this ? Then how itch io fetch games without leaking the api key ?
Hi, here’s what I am trying to achieve:
(This is for a custom launcher)
But I found that there is no way to do that ? I’ve tried to look into the Itch app code but I don’t find where is the entry point for the game’s download…
Is there any way to do that ? Thanks!