[Request] Endpoint for turn by turn attack log | API Developme…

[Request] Endpoint for turn by turn attack log

    • KingLouisCLXXII [2070312]
    • Role: Civilian
    • Level: 100
    • Posts: 2,947
    • Karma: 2,652
    • Last Action: 12 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 18:30:04 - 15/05/24 (1 year ago)
    |
    Last replied 04:13:09 - 16/05/24 (1 year ago)
    There's currently no way to programmatically get the turn by turn log of an attack. It would be great if this could be added as torn->attacklog (or some other name) that takes the attack log ID.
    One use case would be allowing faction leaders to create scripts that provide in depth analysis on the attacks made during a ranked war. Some analysis examples could be:
    - seeing which faction members are 'sniping' kills from their faction mates (ie to punish those who excessively snipe hits or to appropriately credit the kill based on some parameter like damage dealt or join time)
    - seeing the contribution made by each member during a group attack against a strong enemy
    - crediting members who make assists but lose or are intercepted before the attack finishes

    It would be sufficient just have the html of each log line along with the timestamp like faction->attacknews. Im sure we can figure out how to parse the info from there.

    • pobk [3171827]
    • Role: Civilian
    • Level: 58
    • Posts: 165
    • Karma: 178
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:38:43 - 15/05/24 (1 year ago)
    Post link copied to clipboard Copy post link
    This, although it shouldn't be HTML log line.

    This is an API. There's no point in wasting bandwidth and compute cycles on something you can recreate if given the raw data, if you want it.
    Last edited by pobk on 20:45:23 - 15/05/24 (1 year ago)

    ~ P

    Support my suggestions: Faction API Keys

    • KingLouisCLXXII [2070312]
    • Role: Civilian
    • Level: 100
    • Posts: 2,947
    • Karma: 2,652
    • Last Action: 12 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 00:03:15 - 16/05/24 (1 year ago)
    Post link copied to clipboard Copy post link

    pobk [3171827]

    This, although it shouldn't be HTML log line.

    This is an API. There's no point in wasting bandwidth and compute cycles on something you can recreate if given the raw data, if you want it.
    I figured it was stored as HTML in Torn's backend. I guess my point is whatever format is easiest / most convenient for Ched to implement, we as devs can figure out the rest from there.

    • pobk [3171827]
    • Role: Civilian
    • Level: 58
    • Posts: 165
    • Karma: 178
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 00:52:56 - 16/05/24 (1 year ago)
    Post link copied to clipboard Copy post link

    pobk [3171827]

    This, although it shouldn't be HTML log line.

    This is an API. There's no point in wasting bandwidth and compute cycles on something you can recreate if given the raw data, if you want it.

    KingLouisCLXXII [2070312]

    I figured it was stored as HTML in Torn's backend. I guess my point is whatever format is easiest / most convenient for Ched to implement, we as devs can figure out the rest from there.
    I mean sure... But logically the data has to be stored in a format given it's possible to render it differently given different parameters.

    Why may life difficult. Ask for raw data. Much easier for everyone if the API gives it to us hard and raw.... ?

    ~ P

    Support my suggestions: Faction API Keys

    • Flucking_Around [2866434]
    • Role: Civilian
    • Level: 81
    • Posts: 290
    • Karma: 125
    • Last Action: 7 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 01:04:46 - 16/05/24 (1 year ago)
    Post link copied to clipboard Copy post link
    Most likely the data passed as JSON via the API and you can have someone who knows how to code parse the data into the desired format for your uses

    Collecting Frying Pans; send ‘em if feeling generous

    • tiksan [2383326]
    • Role: Civilian
    • Level: 100
    • Posts: 1,012
    • Karma: 1,339
    • Last Action: 6 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 04:13:09 - 16/05/24 (1 year ago)
    Post link copied to clipboard Copy post link

    pobk [3171827]

    This, although it shouldn't be HTML log line.

    This is an API. There's no point in wasting bandwidth and compute cycles on something you can recreate if given the raw data, if you want it.

    KingLouisCLXXII [2070312]

    I figured it was stored as HTML in Torn's backend. I guess my point is whatever format is easiest / most convenient for Ched to implement, we as devs can figure out the rest from there.

    pobk [3171827]

    I mean sure... But logically the data has to be stored in a format given it's possible to render it differently given different parameters.

    Why may life difficult. Ask for raw data. Much easier for everyone if the API gives it to us hard and raw.... ?
    Given that a lot of things like logs have HTML embedded in the database, I imagine attack logs would be similar especially given the response to https://www.torn.com/loader.php?sid=attackLog&ID= is HTML and hasn't been migrated to React yet.

    Although, I'm not sure we want HTML for this given how frequently attack stuff changes and how little notification we get for API changes.

    https://cdn.discordapp.com/attachments/719011659561173012/1237732490513481809/Sith_Larping_Asshats.gif?ex=678f8935&is=678e37b5&hm=6d9a2ed93994782d9020538e0ec71a3d072964d584aceb09e9e6f547752d41e0&

Reply
Thread Title: