1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

Is there a way to get a total count of the guilds?

Discussion in 'Census: General Discussion' started by lokiracer, Apr 5, 2012.

  1. lokiracer

    lokiracer Guest

    I would like to build a list of guilds with pagination.  It's hard to do unless I know a total count of how many guilds there.

    Is there a query something like census.daybreakgames.com/xml/get/eq2/guild/?c:count&c:show:count

    I don't want any data about guilds.  I just want a total count.  This could also be useful for say, getting a count of all male wizard dark elds on Freeport server.

    Maybe there is a way to do this, I just don't know of it.

     
  2. feldon30

    feldon30 Guest

    I think you're looking for /count/. census.daybreakgames.com/xml/count/eq2/guild/?version=1 returns: guild_list count="59782" This should give you what you want: census.daybreakgames.com/xml/count/eq2/character/?type.class=Wizard&type.gender=male&type.race=Dark%20Elf but unfortunately returns a 504 Gateway Timeout.

     
  3. lokiracer

    lokiracer Guest

    Someone get this man a beer.  That's exactly what I was looking for.  I didn't see it documented anywhere though.

    Have there been any mentions of possibly setting up a wiki for the API.  Crowdsourcing documentation and examples might not be a bad idea.

     
  4. feldon30

    feldon30 Guest

    Have you looked at all the sticky threads here: http://forums.station.sony.com/stat....m?forum_id=443 ? Not sure if a full wiki is necessarily required, but certainly a few page document would be nice with example queries. I know I keep my own "data feeds for dummies" text file which I keep adding useful queries to. After the server goes to a 5-server cluster, more interesting/complex queries will hopefully be possible. So far everything we've done has been without farming the entire character records.
     
  5. DanKinney

    DanKinney Guest

    Yeah...I've got that document in my text editor - going very slowly.  I'll try to power through more of it and get it pushed out in a few days.  I've put it together as an annotated tutorial, walking through each concept.  I also want to have a simple "reference card" type of page as well.  I'd be more than happy to take contributions from you guys about what to add.

    Unfortunately, we are not really setup to be able to put together a true WIKI site.

    -dan

     
  6. feldon30

    feldon30 Guest

    If I thought it would be beneficial, I'd set up a wiki, but really I don't see more than about 6-8 pages of information in different groupings with examples below.
     
  7. Antronive

    Antronive Guest

    What about http://eq2.wikia.com. I bet they would be more than happy to hold the information. And it is a proper Wikia already setup for community collaboration.

     
  8. DanKinney

    DanKinney Guest

    I'm not opposed to it, but I cannot be the one to set it up.  I'm happy contribute and comment on it though.

    -dan

     
  9. Lantis

    Lantis Guest

    I'm not sure we really need a full Wiki for this either.  At most, I think what we need is:

    • Up-to-date documentation (we mostly have this in the threads Dan is maintaining here)
    • A summary usage page (pretty much what Dan started at census.daybreakgames.com already)
    • Maybe a forum thread with a list of "recipes", i.e. reposting some of the most commonly used queries that have been posted in various posts here so far: character query, guild roster query, item info query, item image query...
    • A few simple tutorials: how to query for a guild roster, how to query for a list of guild members, how to filter out what to query out of a character, how to resolve what's returned from a character
    • More visibility for those feeds :)  I suspect quite a few potential developers are still unaware of their existence.  Have someone from the community relation post a blurb on the EQ2 frontpage perhaps during a slow week (meaning after the rush related to the coming Game Update #63 has passed) perhaps?
    A lot of this could be done by those of us who have already tinkered a lot with those feeds.  A good portion of the content already exists in the various posts in this forum in fact.



     
  10. Dethdlr

    Dethdlr Guest

    I think one of the biggest issues is that the information is spread out among several different threads.  In the Accessing Data section we have the following threads stickied:

    • Query Commands
    • The Data API
    • Query strings
    Those are the primary locations for documentation but there are other tidbits scattered around in places like API CHANGES and various other threads.  If this information were either smushed together into one place or maybe a new stickied thread posted that indexed what documenation was where with links, that would probably take care of it.

    As it is, I find myself searching sometimes for a piece of documentation that I KNOW I read somewhere but can't seem to track down exactly where.

     
  11. lokiracer

    lokiracer Guest

    Is it me, or is this query not being sorted

    [url="census.daybreakgames.com/s:eq2scene/xml/get/eq2/guild/?c:start=0&c:limit=30&c:sort:name:1&c:show=name,name_lower,world,level">census.daybreakgames.com/xml/get/eq2/gui...wer,world,level[/url]

     
  12. Lantis

    Lantis Guest

    It should be:

    Code:
    c:sort=name:1
    (you used : instead of =)

     
  13. Dethdlr

    Dethdlr Guest

    I'm pretty sure c:sort=name:1 isn't any different than c:sort=name.  The :1 doesn't really do anything.

    If you want to sort in reverse order though, then do c:sort=name:-1

     
  14. Lantis

    Lantis Guest

    Look again - he was trying c:sort:name:1 :)

     
  15. DanKinney

    DanKinney Guest

    The pattern for a query string is name=value.  In your example, the "name" is c:sort and the "value" is name.  Normally, the "name" is something in the data.  We use the c: prefix to indicate that this is a Query Command - something that is applied to the results after the query has been processed.

    You can specify the sort as being ascending with a :1 or descending with a :-1 added to the value as a modifier.  This makes the "value" be name:1 or name:-1.  If you don't have a modifier, it defaults to :1.

    Note...for character data from eq2, name is itself an object.  You probably want to use name.first instead.  Or better yet, use name.first_lower.  For guild data, the name is a simple attribute.

    So, I am pretty sure the query you are looking for is...

    census.daybreakgames.com/s:eq2scene/xml/get/eq2/guild/?c:start=0&c:limit=30&c:sort=name:1&c:show=name,name_lower,world,level

    You don't really need the c:start in this particular example (it defaults to zero).  There seems to be a number of guilds that have empty names.  That needs to be looked at.

    For bulk loading such as this, you probably want to sort on something more interesting, like last_update...

    census.daybreakgames.com/s:eq2scene/xml/get/eq2/guild/?c:limit=30&c:sort=last_update:-1&c:show=name,name_lower,world,level,last_update

    Make sure that you include last_update in your c:show so that you can sort on it.  If you want to page through the results, you can use subsequent calls by capturing the min_last_update (or max_last_update) from the results.

    census.daybreakgames.com/s:eq2scene/xml/get/eq2/guild/?c:limit=30&c:sort=last_update:-1&c:show=name,name_lower,world,level,last_update&last_update=>1333869320.398980

    You can see this more interactively by using the jml renderer: 

    census.daybreakgames.com/s:eq2scene/jml/get/eq2/guild/?c:limit=30&c:sort=last_update:-1&c:show=name,name_lower,world,level,last_update

    ...and then click on the link for the min_last_update field; it will go to the next "page" of results (and you can see how the query string changed for it).

    I'm trying to roll up the documentation into a set of pages that can live right on census.daybreakgames.com.

    -dan

     
  16. Dethdlr

    Dethdlr Guest

    Wasn't disputing that at all.  It wouldn't work right the way he had it and your suggestion to fix it is what was needed.  

    I was just adding that :1 is the default so putting that onto the end of it isn't really doing anything.  But putting :-1 would sort it in reverse order.  :)

     
  17. lokiracer

    lokiracer Guest

    Ah, thanks guys.

     

Share This Page