From 77877c19d4698bcd4499efb070731bea6771dab3 Mon Sep 17 00:00:00 2001 From: luckygulli Date: Sun, 4 Jun 2017 11:02:58 +0200 Subject: [PATCH 1/2] Update README.md Markdown corrections for GitHub --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 4d60110..45d087d 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -#OGetIt +# OGetIt OGetIt is a open source library for handling the new OGame API as of version 6. It handles everything from connecting with the API, parsing the API to advanced calculations to get detailed results. -##Supported features -###Reports +## Supported features +### Reports * Combat * Harvest * Espionage * Missile -##How to use? +## How to use? include('autoload.php'); //Or via Composer $ogetit = new OGetIt($uni, $lang, $apikey); @@ -28,40 +28,40 @@ It handles everything from connecting with the API, parsing the API to advanced //Get Missile report $mr = $ogetit->getMissileReport($mrkey); -###Examples -####Get attacker losses from combat report +### Examples +#### Get attacker losses from combat report $cr = $ogetit->getCombatReport($crkey); $result = $cr->getCalculator()->getFinalResult(); $result->getAttackers()->getLosses(); -####Get harvested metal from harvest report +#### Get harvested metal from harvest report $rr = $ogetit->getHarvestReport($rrkey); $rr->getMetal(); -####Get Astrophysics level from espionage report +#### Get Astrophysics level from espionage report $sr = $ogetit->getSpyReport($srkey); $sr->getDefender()->getResearch()[Astrophysics::TYPE]; -####Get defender losses from missile report +#### Get defender losses from missile report $mr = $ogetit->getMissileReport($mrkey); $mr->getDefender()->getLosses(); -##Requirements +## Requirements * PHP v5.4+ (64-bit) * PHP cURL (libcurl v7.10.5+) -##Exceptions +## Exceptions -###cURL codes +### cURL codes http://curl.haxx.se/libcurl/c/libcurl-errors.html -###OGame API codes +### OGame API codes OK = 1000; INVALID_VERSION = 4000; @@ -72,13 +72,13 @@ http://curl.haxx.se/libcurl/c/libcurl-errors.html INTERNAL_ERROR = 5000; INVALID_CR_ID = 6000; -##Contributing +## Contributing If you want to contribute code please fork this repository and create a pull request to merge your changes. Your changes will be reviewed and merged afterwards if approved by the repository maintainers. -##License +## License GNU Lesser General Public License, version 2.1 -* License: [GNU LGPL](COPYING) \ No newline at end of file +* License: [GNU LGPL](COPYING) From 99b94492e15f2dd401fbf7e99ba588d87ad79b11 Mon Sep 17 00:00:00 2001 From: luckygulli Date: Mon, 19 Jun 2017 22:53:17 +0200 Subject: [PATCH 2/2] use OGetIt\OGetIt; Import the class OGetIt\OGetIt before using it. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 45d087d..edff52c 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ It handles everything from connecting with the API, parsing the API to advanced ## How to use? include('autoload.php'); //Or via Composer + use OGetIt\OGetIt; $ogetit = new OGetIt($uni, $lang, $apikey); //Get Combat report