What's the Card Hunter API? Read all about it here: http://www.cardhunter.com/2013/12/card-hunter-api-is-ready/
Sweeeeeeet! Hmmm.... I expect that you will hear much clamoring for access to player rating/ranking. I would guess that it makes the most sense to return that data with a battle query, if it's been stored at all. (Also, apologies, I will probably hit 150 queries very quickly as I poke at the API.)
I don't believe that filtering is available yet but it's certainly something we could look at adding.
Great ! My first tots are targeted at the AI...tracking daily win rates on the wiki and rating fluctuations. Would also help see if changes to the AI behavior routines work, as well as lotsa other stuff... whee, fun times !!
I have no idea how I'm supposed to use this. I'm trying this URL: http://test-api.cardhunter.com/items?battle_id=155558&player_index=0&character_index=0 And I'm getting I'm getting a completely different battle: Code: {"meta":{"total":155561,"first":"/items?count=10&page=first","last":"/items?count=10&page=last","prev":null,"next":"/items?count=10&page=next&demarc=9413:1:1:746"},"items": [{"id":"9413:1:0:152","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":152,"count":1}, {"id":"9413:1:0:429","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":429,"count":1}, {"id":"9413:1:0:1023","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":1023,"count":1}, {"id":"9413:1:0:1521","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":1521,"count":1}, {"id":"9413:1:0:1644","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":1644,"count":1}, {"id":"9413:1:0:1673","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":1673,"count":1}, {"id":"9413:1:0:100197","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":100197,"count":1}, {"id":"9413:1:0:100294","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":100294,"count":1}, {"id":"9413:1:0:100362","battleId":9413,"playerIndex":1,"characterIndex":0,"itemId":100362,"count":1}, {"id":"9413:1:1:746","battleId":9413,"playerIndex":1,"characterIndex":1,"itemId":746,"count":1}]}
There is no battle 15555 on the test server yet, so it's probably returning the latest battle, which is 9413.
Ah, nope... these urls (cross-referenced from /battles) also return data for battle 9413: http://test-api.cardhunter.com/items?battle_id=9401 http://test-api.cardhunter.com/items?battle_id=9398
/characters does the right thing, though... - http://test-api.cardhunter.com/characters?battle_id=9398
Okay, trying it with test server IDs works better: http://test-api.cardhunter.com/items?battleId=180 Note that I'm using "battleId" not "battle_id". Still can't change the player or character values. The question I was testing: "Is it possible to get items from a character during the battle?" The answer appears to be "Yes, but only the first character of the first player." PS. These last five posts should probably be a separate thread, maybe "Idiot's Guide to the API"