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

PS2 API Question: outfit online member count

Discussion in 'Census: Planetside 2' started by Amich, Feb 21, 2013.

  1. Amich

    Amich Guest

    Hi all,

    Very excited to start working with the PS2 API, it looks fantastic so far so major kudos to the dev team. 

    Everything seems very clear, but I cant seem to get this chained resolver to work. Basically I want to pull a list of outfit members and for each member determine if they are online. Ideally this could just be one query, so that I don't have to hit the online_character_status endpoint in a loop.  I have tried this:

    http://census.daybreakgames.com/get/ps2-beta/...r(online_status)

    But it doesn't return any character information. Any ieas would be appreciated.

    Ami

     
  2. JoeyTan

    JoeyTan Guest

    Hi,

    You're right currently we don't have a "resolve" for online status at this level.  Good use case though, I'll add it to our list of improvements, thanks!

    - Joey

     
  3. Murciela

    Murciela Guest

    Good addition!<span style="white-space: pre;">

     
  4. DereksDontR

    DereksDontR Guest

    has this been implemented since Friday?  only ask 'cos doesn't "&c:resolve=online_status" provide the data?

    returns a 0 if offline and a world_id if they're online.

    what I'm trying to work out is how to resolve the name.en from the world list along with the world_id code (whether it's obtained for a character through resolve=online_status or resolve=world).  e.g. returning "miller" along with world_id=10

    any ideas?

    *edit* my bad, just tried with the OP's /outfit/ link and it's not resolving online_status as it does for a /character/ request.  soz, I'll get my coat...

     
  5. JoeyTan

    JoeyTan Guest

    hey guys,

    here are some new queries that we put up today, o<span style="color: #1f497d;">ne off of outfit_member and one off of outfit.  Hopefully this gets you what you need.

    <p ><span style="color: #1f497d;">

    <p ><span style="color: #1f497d;">[url="http://census.daybreakgames.com/get/ps2-beta/outfit_member/37509488620604330?c:limit=100&c:resolve=online_status">http://census.daybreakgames.com/get/ps2-beta/...e=online_status[/url]

    <p ><span style="color: #1f497d;"> 

    <p ><span style="color: #1f497d;">[url="http://census.daybreakgames.com/get/ps2-beta/outfit?alias=666&c:resolve=member_online_status">http://census.daybreakgames.com/get/ps2-beta/...r_online_status[/url]



     
  6. Stan

    Stan Guest

    This is great.

    But you have to look up the command .. so its counter intuitive

    <a rel="nofollow" href="http://census.daybreakgames.com/get/ps2-beta/outfit/37509488620601345?c:resolve=member_online_status,member_character(id,rank,name,type.creation_date,times,experience"]http://census.daybreakgames.com/get/ps2-beta/...imes,experience[/url])

    When I look at the JSON result and see

    <span><span>"members<span>": [

    • -
      {
      • <span><span>"rank<span>": <span>"Officer",
      • <span><span>"member_since<span>": <span>"1.353423957E9",
      • <span><span>"character_id<span>": <span>"5428010618015187025",
      • <span><span>"online_status<span>": <span>"0"
      },
    I expect this to work ..

    <a rel="nofollow" href="http://census.daybreakgames.com/get/ps2-beta/outfit/37509488620601345?c:resolve=member_character(id,rank,name,type.creation_date,times,experience,online_status"]http://census.daybreakgames.com/get/ps2-beta/...e,online_status[/url])

    as 'online_status' is a field in the member_character result

    Is it too late to make it consistent?

     
  7. JoeyTan

    JoeyTan Guest

    Hi Stanis,

    unforutnately that is just the way our data is organized in the backend.  if you take a look at:

    http://census.daybreakgames.com/get/ps2-beta/

    you can see there are different objects, one being "characters_online_status".  The naming convention is indeed a little clunky for outfit as we had to differentiant between what "type" of character (ie. leader vs member, etc), hence "member_online_status"

    Resolves take place between objects, the reason why you can't have (online_status) in parenthesis for a character is that the character object does not contain "online_status" info, it has to be resolved from the online_status object.

     
  8. Goblinhunt

    Goblinhunt Guest

    Is there anyway to filter this? I would like to track the number of outfit members online at a point in time, for this I could just use the count (rather than get) URL to get a single number back from the API, but only if I can filter out users with an online_status of 0, which I can't seem to do currently.

    It seems silly for me to have to pull down a full member list for an outift, just to have to pull out those users with a 0 and count the rest to get a single number. Providing a count method would put a lot less strain on the API.

     
  9. JoeyTan

    JoeyTan Guest

    The issue here is that online status is a "resolve" and not already part of the character object.  in that sense we don't know what it will be before we get it, so in that sense we can't really filter at that point

     

Share This Page