Pinned New API for retrieval of combat reports

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 1)
      When I trie to display data from the API, I only have things like that :

      Source Code

      1. 
      :huh:

      I must do something wrong. What I need to write instead of "// Parse and store information in your own database here!"
      To display for example the metal loots ?



      2)
      Is it possible to put the CR key somewere in the resumed CR ? (displayed or not)


      3)
      I have a key for Bermuda. Does it mean that we will need a different key for each universes ?




      Thanks for the API, and ansers :)


      ** OgameTech **
    • Hi vulca,

      1:
      My experience of the last evening testing the api on universe 680, there a no problems with combat reports generated on 3.6. Maybe an older report? TheViking had one from 28.5 which generates php notices, but no other character crap.

      `json_decode` returns a `stdClass`. So accessing loot an debris would be `echo $result->RESULT_DATA->generic->loot_metal;` in the example code snippet.
      But I think the fields `loot_{metal,crystal,deuterium}` and `debris_{metal,crystal}` were just added in the example output, not in beta1-code on servers. So this data is currently missing.

      2:
      Do you mean that you are allowed to publish the cr_id in the public output of your tool?
      In the returned data the combat report id is included: `$result->RESULT_DATA->generic->cr_id

      I think publishing the id MUST NOT be done on public pages. These keys should only be owned by the participating players.

      3:
      I don't think so. This would be a big administration overhead. I think that the api keys are currently limited to one universe due to deployment considerations.

      Yours

      Imp

      P.S.: This was initially written on mobile phone (i) ;)
      P.P.S.: VOTE FOR MARKDOWN <3
      OGame Tech
    • 1) That works !!
      My bad. Thanks :)


      2)
      No, I mean, currently we can only see the CR ID on the detailed combat reports.
      It would be usefull to have it on the non detailed CR (in the ogame message page)
      Then we don't have to open the detailed CR to send it to a converter, or other tool


      3)
      OK


      EDIT : The date of the CR will be needed for CR converter (at least in france, the date is mandatory)
      It would be nice to add it ;)


      ** OgameTech **

      The post was edited 1 time, last by vulca ().

    • Hi,

      I'm building the starting blocks for an API library in PHP.
      Except for the rounds which are being build for the next beta, i'm missing certain ID's.
      For example the planet ID & player ID, these would be more usefull for identifying & searching a planet or player instead of a name (string).
      Also those ID's are firm, names can change and are more difficult to match.

      Can these be added ?
      Planet ID - inside generic

      ["combat_coordinates"]=>
      string(5) "1:1:9"
      ["combat_planet_type"]=>
      int(1) // 1 == Planet, 3 == Moon
      ["combat_planet_id"]=>
      int(10001)

      ["loot_percentage"]=>
      int(50)

      Planet ID - inside Attacker/Defender Fleets

      ["fleet_owner"]=>
      string(10) "M.O.O.N.S."
      ["fleet_owner_coordinates"]=>
      string(6) "1:1:16"
      ["fleet_owner_planet_type"]=>
      int(1)
      ["combat_planet_id"]=>
      int(10002)

      ["fleet_owner_planet_name"]=>
      string(17) "Unendliche Weiten"

      Player ID - inside Attacker/Defender Fleets

      ["fleet_owner_id"]=>
      int(5001)

      ["fleet_owner"]=>
      string(10) "M.O.O.N.S."
      ["fleet_owner_coordinates"]=>
      string(6) "1:1:16"
      ["fleet_owner_planet_type"]=>
      int(1)


      Thanks a lot for this API :)

      Grtz,
      Warsaalk
    • Hi,

      I noticed some generic values are missing.
      When retrieving the report I don't see these 5 values:
      ["loot_metal"]=> int(0)
      ["loot_crystal"]=> int(0)
      ["loot_deuterium"]=> int(0)
      ["debris_metal"]=> int(0)
      ["debris_crystal"]=> int(0)

      CR-KEY's:
      cr-en-680-efc6370305dc361037f60d0281ed3b415b921257
      cr-en-680-84fb81d8b61c71fcddf814eeb58d90ded5bf869e

      Grtz,
      War
    • Do you know if the bug with ".999" on debris field is fixed in the API data ?
      (prntscr.com/77k5oe)



      EDIT :

      Source Code

      1. $result->RESULT_DATA->rounds[$round]->attacker_ships[$i]->owner

      That return the number of the fleet, and not the user name. Is that normal ?
      (not a problem, but it's surprising)



      EDIT2 :
      Still no date of the CR on the CR API ?



      EDIT3 :
      Is it possible to have the CR_KEY on the short CR too ? To avoid to request to detailled CR to have it :)
      (done)


      ** OgameTech **

      The post was edited 3 times, last by vulca ().

    • Hi,

      When will the server restriction be removed ?
      I'd like the origin users to test my CR converter next week or the week after that :)


      vulca wrote:

      That return the number of the fleet, and not the user name. Is that normal ?
      (not a problem, but it's surprising)

      I like to call it the combat_index, at first I also though it was weird but now it makes sense :D

      vulca wrote:

      EDIT2 :
      Still no date of the CR on the CR API ?

      Indeed, I think this should also be in the CR.

      Grtz,
      War
    • RC means, it's nearly ready for the release.
      I test this version with my Skynet addon on Origin server s670.
      The espionage reports are currently broken. Instead of fleet, it shows defence. Defence is shown twice and you can not safely attack somebody, cause you do not see the fleet.
      To check I'd like to test the new API key but I don't find the URL nor the description how to use this new API.
      Where is this described?
      Do I still have to register to get the right to test this API or is this step not necessary any more (cause RC1 is a release candidate) ?

      Regards
    • Hey ciap if you want a tool to show your CR's to friends or the public, I think i got something for you ;) Atm it is only available in german and english, but if you can translate it for us if you want, so your whole community can enjoy this tool :)
      Just have a look at it: ogmem.com/

      Also we only support v5 atm, but v6 support should be there in a few days.

      Origin Admin
      OGame-Tech Chief
    • ciap wrote:

      I have cr-pl-105-8cef5ed2c05d55a0b615767bced57ef8b450468b
      how link will be looks? :(


      Done via ogotcha.universeview.be/

      ogotcha.universeview.be/en/rep…8d-5271-a06c-cd5cf8ac3f8f

      --------------


      On 07-09-2015 --:--:--, the following fleets met in battle:

      Attacker ciap
      ________________________________________________

      Espionage Probe 1
      _________________________________________

      Defender roko
      ________________________________________________

      _________________________________________


      After the battle ...

      Attacker ciap
      ________________________________________________

      Espionage Probe 1 ( -0 )
      _________________________________________

      Defender roko
      ________________________________________________

      Destroyed!
      _________________________________________


      The attacker has won the battle!
      The attacker captured:
      0 Metal, 0 Crystal and 0 Deuterium

      The attacker lost a total of 0 units.
      The defender lost a total of 0 units.
      At these space coordinates now float 0 metal and 0 crystal.
      The attacker captured a total of 0 units.


      Summary of profit/losses:
      The attacker(s) lost a total of 0 units.
      The defender(s) lost a total of 0 units.

      Converted by OGotcha CR Converter 4.0


      LG
      Being a QA is sort of like being a goal keeper. People only talk about you when you’ve screwed up. We are the silent guardians of game development, and they will never have to thank us.