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

Multiple join in one query ?

Discussion in 'Census: Planetside 2' started by Hexalyse, Jan 22, 2014.

  1. Hexalyse

    Hexalyse Guest

    Hello,

    I would like to know if it's possible to do multiple "join" on one query. Here is an example of what I'd like to achieve :

    Let's consider this query :
    http://census.daybreakgames.com/get/ps2:v2/characters_event/?character_id=5428033621819268785&type=KILL,DEATH&c:limit=10&c:join=type:character^show:name.first'faction_id
    It gets the last 10 kills or death of a player in Planetside 2, and "join" the name and faction of the character_id (ie. the killed player)

    But the problem is that in case of a death, the killed player is not what I'd like. Instead, when it's a death, I'd like to resolve the attacker_character_id, like in this query :
    http://census.daybreakgames.com/get/ps2:v2/ch...cter_id^show:name.first'faction_id'profile_id
    <span style="font-size: x-small">(which is way simpler with a c:resolve, in this case : http://census.daybreakgames.com/get/ps2:v2/characters_event/?character_id=5428033621819268785&type=KILL,DEATH&c:limit=10&c:resolve=attacker(name.first,faction_id) but I doubt resolve would help, here. c:join seems way more versatile)

    So, could it be possible to make these two query in one and only one, so that I have the character_id and the attacker_character_id informations all in one JSON object ?

    Thank you in advance for your help :)
     
  2. airmetforums

    airmetforums Guest

    Yes that is possible. Just keep adding &c:join=. Documentation for doing this is on census.daybreakgames.com. If there is something unclear in the doc then let me know and I will update it.

    I saw your Logitech keyboard app at http://hexrandom.com/blog/2014/01/23/planetside-2-stats-lcd-panel-for-logitech-keyboards-beta-1/ and I'll use that as a basis for the example. (Also please use a service id in your app! You can sign up for one on http://census.daybreakgames.com/#devSignup)

    This query gets the last 4 kills/deaths and joins to victim (character_id) and attacker (attacker_character_id):

    http://census.daybreakgames.com/s:soe/get/ps2...battle_rank.value'faction_id^inject_at:victim

    This query gets the character info you're showing in lcd 2 along with kills as one join and stats as a second join:

    http://census.daybreakgames.com/s:soe/get/ps2..._time^terms:stat_name=deaths^inject_at:deaths
     

Share This Page