|
|
It seems as if there is much interest to return this functionality. The data does not require authentication so it seems a nice fit for the api.
We miss it. Can we bribe the dev team into working on this one? We will send you cakes and cookies. Please? |
|
Web & Mobile Team
|
It seems as if there is much interest to return this functionality. The data does not require authentication so it seems a nice fit for the api. We can't tell you that we accept bribe. We can only tell you that we really like hot cookies and cold frosty beverages. |
#2
1/18/2012
|
|
*places a plate of steaming macadamia nut cookies on the table*
*hands out a round of ice-cold milk* *sits down at the table* *leans back* *folds arms before her* *gives the Web & Mobile Team a long stern look* So... now tell me, how's buisness these days? |
* Shows up with Buddy from Cake Boss to bake fresh cookies on site. * Waves in multiple beer delivery trucks, as well as trucks from Coke, Pepsi and a local dairy. * Has a busload of swimsuit models to hand out refreshments. So guys, what say we get the old Armory guild bank logs working again? |
|
Edited by Garopp on 2/6/12 3:06 AM (PST)
Order Summary: Hot cookies and cold frosty beverages. Let me know if you need any more :) Really looking forward to some sort of character feed and have lots of ideas for its use! I promise your long hours spent toiling away will not be in vain. |
|
|
Edited by Cordana on 4/16/12 2:54 AM (PDT)
Wanna bump this... putting together our guild site and this is really the only thing the site needs. I already have everything pulling into and updating a database hourly (loading data 24 times a day as opposed to potentially hundreds of times a day with each page refresh) and would rather not put the work into harvesting pages. I was honestly stunned to find no RSS feeds by default. I really thought there'd be both, but the RSS feed OR the API at a bare minimum.
|
|
I am trying to get recent achievements and loot for my site as well. I'm trying to use the API to just to get the 5 largest time stamps for each, get the ID's that correspond to the time stamps and compare them to the full list of achievements and obtain that ID and title. From there it should be easy, but the full achievement json file is super nested and is hard to traverse making say something like this:
foreach($Achievements[id] as $idNum) difficult. If anyone has found an easier way of doing this i would be interested to hear from you.
|
I don't know what language you're using, but here's a snippet of Ruby I used for a toy app of mine. It results in an array of hashes each with an ID and a name; the full finalized data structure can be seen at http://achieveit.heroku.com/ach def parse_achievements(ach)The full source for the main file is at https://gist.github.com/2432197. Please note I made this app in a couple hours and haven't looked at, according to the Git log, since November--so I make no guarantees that it still works at all. :) ________________________________________________ MVP, Web and API Libraries for the Community Platform API: http://us.battle.net/wow/en/forum/topic/2369882588 |
|
|
Cyaga, does that do any way of pairing up with who got the achievement?
ex: Kieble hits lvl 85. Also from the looks it doesn't cover items right? I'm trying to make a hacked together one too in php, but just trying to figure out what has been done and the paths people have taken. For the achievement it's basically guild-> get latest achievements -> pair id with the id of achievement pretty much? |
No, it doesn't--it's simply a flattened view of the data at http://us.battle.net/api/wow/data/character/achievements (while only keeping the ID and achievement name around). At https://gist.github.com/2433774 you can find another script I threw together to build a giant flattened hash of all the achievements, keyed by their IDs; it also keeps track of which category/subcategory the achievement is in. There is some example output in case you don't have Ruby on your machine. Once the data is flattened like this, it's easy to look up an achievement by its ID or search through the array for other criteria. As for matching up earned achievements, I think you're on the right track. The JSON response for a character with achievements included returns six arrays: achievementsCompleted, achievementsCompletedTimestamp, criteria, criteriaQuantity, criteriaTimestamp, and criteriaCreated. The first two arrays have the same length, as do the last four. If, say, you wanted to see the character's most recent achievement, you could find the largest timestamp in the achievementsCompletedTimestamp array and store its position in that array. Find the element in the same index in the achievementsCompleted array, and that is the ID of the achievement that was completed. Finally, use that ID to find the achievement data (which is where the flattened view of achievement data is useful) and you have what you're looking for. ________________________________________________ MVP, Web and API Libraries for the Community Platform API: http://us.battle.net/wow/en/forum/topic/2369882588 |
|
Edited by Shãuni on 4/22/12 10:11 PM (PDT)
I am using PHP and I am close to where you are but I am having issues where it is not adding one or two of the arrays 'achievements' or 'categories' like its getting some but not all, so some data is not being returned. I am checking the most recent ID's earned by the character to those arrays as I run past them. Basically stepping through the first main array and if it finds the ones named 'achievements' or 'categories' it sends them to a function that compares the ID's the player earned within THOSE in the arrays sent and returns an array of the top five ID's along with its corresponding time stamp and Title. I did not think it would be this hard when i started and I am nearly finished aside from finding the missing arrays, but i do like your recursion. Going to see if PHP has some similar functions i can use. |
