View Full Version : API and/or allowing cURL search
Atjabec
02-23-2009, 09:13 AM
As a developer I'd like to get more out of AoC player profiles. Idea is to show information about our guild mates straight ingame. I have customized Ragebot running, which already knows a lot of our members, but would love to show information from your database too.
So would it be possible to get an API to query your player database?
Example:
http://api.aoc.yg.com/profile?nick=Aaroeen&srv=11
quering that URI would return JSON or XML formatted output of that page ( http://aoc.yg.com/profile?h=WRiNSPhO ). This would be just pure awesomeness! ;)
Building an API will of course take some time, so my second wish is for you to enable searching your site using cURL or by other methods. I tried using your search (searching player by name, then parse profile and show info), but only thing I got was nice 417 (http://en.wikipedia.org/wiki/HTTP_status_code#4xx_Client_Error) error. So please configure your server to allow POST from external servers.
I know people have been trying to code an addon to the popular BeBot in order to allow "inspects" by use of the bot+YG.
The possibility of cURL enabled access to the server would be a great step towards advances on this addon, please keep it in mind..
YGAdmin
02-24-2009, 05:03 PM
Hey guys, we'll look into this and see what we can do.
Atjabec
02-27-2009, 07:23 AM
Ok seems like I just had some wrong parameters on my cURL post, so I'm now able to parse html data from your site with my bot. So from first message only API is needed.
I already coded small Ragebot plugin, which allowes me to search users by !yg [charname] or !who [charname]. This displays infowindow about user (if found), and shows links to users gear. Clicking gear shouts back to bot (linking to images from infowindow doesn't work(?)), which then displays info about that particular item. Currently bot only knows items it has "seen" in guild chat or by private tells.
As info for you YG, one search creates two hits on your site: First searching user using POST data, then if returned page have one user, code sends another call to fetch that users page. This is because urls for profiles are encoded and cannot be determined by usernames. To save load a bit, users url is saved in cache for a week once it's found, so searching multiple times same user will produce only one hit after first search.
zekk, thanks for that BeBot, will look at it if it's any better than Ragebot. At least creating plugins for Ragebot is a 5min job.
YGAdmin
02-27-2009, 08:33 AM
That's a cool feature for sure. We'll look into some ideas for an API with something like XML support in the future when we get some more core tech features out. If there is anything else we can do to help out don't hesitate.
Also we'd love to see some screen shots of it in action. :D
Daworm
02-28-2009, 10:05 AM
BeBot already has an item scraper in it for bebot's makers database use already...
If you do look at developing on BeBot maybe you could hijack this feature recode it slightly (IE: upgrade) and even allow other people running bebot's to link it to your central server based bot for reporting items that are found?
As BeBot has a "item first discovered by (IE: reported by)" feature in it at times, which is good for epeen'ing.
Jaheira
03-02-2009, 11:26 AM
Having no idea what you guys are talking about, I thought it better to ask here rather than start a new post:
Can we make the item database a more flexible search?
At the moment, we can only search by name. Can each item ability field be discrete in the database so that if I use (for instance) a drop down list to select "ring", "+cold damage", and "+natural mana regen", and item level "66-80" that it will be able to return all matches? Perhaps "2H edged" and "+fire damage"?
It would give people an idea of where to look for gear upgrades rather than pawing aimlessly through long lists. I'm looking for a +electrical damage ring, only to find there are very, very few (especial compared to, say, cold damage rings). Your search engine doesn't allow for flexible field-based searches that I can see.
-
On another note, have you guys considered having an "embed" link on each page for your items, so that they make a neat 120x200 (for instance) animated .gif file (I say animated because you could have it link to a render of the item in the future) with a nice little logo of your stamped at the bottom? That way, someone can say in their own forums "Hey, I saw this wicked sword drop, it was this:" and link to the dinky little url. That translates to a small, clean pic of the item stats, with your logo/page discretely placed on it. Everyone in the thread doesn't say "meh 2lazy2clikfail", they see the item which generates interest, everyone applauds the e-peen, and you guys get a wee spot of advertising.
Mithos
03-02-2009, 12:22 PM
Having no idea what you guys are talking about, I thought it better to ask here rather than start a new post:
Can we make the item database a more flexible search?
At the moment, we can only search by name. Can each item ability field be discrete in the database so that if I use (for instance) a drop down list to select "ring", "+cold damage", and "+natural mana regen", and item level "66-80" that it will be able to return all matches? Perhaps "2H edged" and "+fire damage"?
I second this, even if it's a little offtopic. Btw, would be great to have more flexible search on players and guilds too - to be able to search "all 5 pvp level ToS on EU servers sorted by k/d-descending" for example.
YGAdmin
03-02-2009, 07:23 PM
We have been looking at some new ideas to help users find the data they are looking for much easier. Currently we do have the feature to create filters that can help narrow down the results.
At the moment, we can only search by name. Can each item ability field be discrete in the database so that if I use (for instance) a drop down list to select "ring", "+cold damage", and "+natural mana regen", and item level "66-80" that it will be able to return all matches? Perhaps "2H edged" and "+fire damage"?
It would give people an idea of where to look for gear upgrades rather than pawing aimlessly through long lists. I'm looking for a +electrical damage ring, only to find there are very, very few (especial compared to, say, cold damage rings). Your search engine doesn't allow for flexible field-based searches that I can see.
To simulate your ring example if go to the ring category in the menu:
http://aoc.yg.com/items/Ring/42
Then click the 'Create Filter' button you use the 'Modifiers' drop down. From there you can select any modifier that appears on any of the rings and filter your results by that.
I second this, even if it's a little offtopic. Btw, would be great to have more flexible search on players and guilds too - to be able to search "all 5 pvp level ToS on EU servers sorted by k/d-descending" for example.
Similar to the above way you can create filters on the player profiles, for example if you wanted all ToS's on US Server Set:
http://aoc.yg.com/profiles?srv=1
Then go to 'Create Filter' and you'll be able to find all the ToS's on that server. You can then sort by K/D Ratio by clicking on the column header of your choice.
In the case of player profiles it looks like we need to add the PvP level to help narrow down searches more. We also are looking at doing a paging sort of result where you get the next set of 200 or so results if you're query yields too many results.
The filter system may not be exactly what you guys were looking for but please keep the suggestions coming.
Jaheira
03-03-2009, 11:14 AM
Ah, my bad... ty!
zekk, thanks for that BeBot, will look at it if it's any better than Ragebot. At least creating plugins for Ragebot is a 5min job.
Its about the same, but its actively updated and there is a good chunk of forum interaction with the creators.
Mithos
03-04-2009, 10:51 AM
Then go to 'Create Filter' and you'll be able to find all the ToS's on that server. You can then sort by K/D Ratio by clicking on the column header of your choice.
Yeah, i know about filter and found it pretty useful - all i want is to have more options in it - PvP level for example or "all EU servers". And if i have a big recordset in result (i.e., if i have more then 30 5-lvl ToS) i can't sort 'em after by total kills using click-on-table-header as the rest of the records are on another pages.
Kentarii
03-12-2009, 02:58 AM
I know people have been trying to code an addon to the popular BeBot in order to allow "inspects" by use of the bot+YG.
The possibility of cURL enabled access to the server would be a great step towards advances on this addon, please keep it in mind..
Has any of these modules for bebot been released yet?
I've actually been working on my own since I saw a post over at the bebot forums. Will try to post some screenshots shortly.
How often are the stats updated and do you collect data from all instances of Kheshatta on Fury server or just one? And how do I know if I'm in the right one if it's just one? Wouldn't it be better to have the profilers at the trade hubs, like OT?
YGAdmin
03-13-2009, 07:37 AM
Very cool screen shots by the way.
How often are the stats updated and do you collect data from all instances of Kheshatta on Fury server or just one? And how do I know if I'm in the right one if it's just one? Wouldn't it be better to have the profilers at the trade hubs, like OT?
Stats are updated as soon as a character gets re-profiled again, assuming something changed of course.
It would only be able to be on one instance of Kheshatta at a time and I'm not sure which one either as it would change from time to time. Currently to know you'd have to check the site to see if you got updated or not.
We do have a lot of profilers at trade hubs but we like to test other areas as well.
Kentarii
03-13-2009, 11:06 AM
Thanks for the answers.
Spent 1-2 hours in Kheshatta now with Kentarii, but still no profile (only one instance up) :(
Guess I'll have to come back at a later time.
Edit: Updated now :)
Miyaichi
03-14-2009, 03:00 PM
would love to get this module, would also LOVE to have one in khes on gwahlur.
with the pop as low as it is, there really would be only 1 instance at any given time.
or perhaps conarch village, next to the wagoneer (even on other servers) its a main hub, everyone uses the wagoneer for Kyllikk, Yakhmar, Vistrix, Aztels.. so it will get ALOT of people.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.