2017 © Pedro Peláez
 

library ogetit

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

image

ogetit/ogetit

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  • Saturday, July 18, 2015
  • by Klaas
  • Repository
  • 5 Watchers
  • 18 Stars
  • 112 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 3 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

OGetIt

OGetIt is a open source library for handling the new OGame API as of version 6., (*1)

It handles everything from connecting with the API, parsing the API to advanced calculations to get detailed results., (*2)

Supported features

Reports

  • Combat
  • Harvest
  • Espionage
  • Missile

How to use?

include('autoload.php'); //Or via Composer
$ogetit = new OGetIt($uni, $lang, $apikey);

//Get Combat report
$cr = $ogetit->getCombatReport($crkey);

//Get Harvest report
$rr = $ogetit->getHarvestReport($rrkey);

//Get Spy report
$sr = $ogetit->getSpyReport($srkey);

//Get Missile report
$mr = $ogetit->getMissileReport($mrkey);

Examples

Get attacker losses from combat report

$cr = $ogetit->getCombatReport($crkey);
$result = $cr->getCalculator()->getFinalResult();
$result->getAttackers()->getLosses();

Get harvested metal from harvest report

$rr = $ogetit->getHarvestReport($rrkey);
$rr->getMetal();

Get Astrophysics level from espionage report

$sr = $ogetit->getSpyReport($srkey);
$sr->getDefender()->getResearch()[Astrophysics::TYPE];

Get defender losses from missile report

$mr = $ogetit->getMissileReport($mrkey);
$mr->getDefender()->getLosses();

Requirements

  • PHP v5.4+ (64-bit)
  • PHP cURL (libcurl v7.10.5+)

Exceptions

cURL codes

http://curl.haxx.se/libcurl/c/libcurl-errors.html, (*3)

OGame API codes

OK = 1000;
INVALID_VERSION = 4000;
INVALID_API_KEY = 4001;
INVALID_API_KEY_EXPIRED = 4002;
INVALID_API_PERMISSION = 4003;
INVALID_PATH = 4004;
INTERNAL_ERROR = 5000;
INVALID_CR_ID = 6000;

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., (*4)

License

GNU Lesser General Public License, version 2.1, (*5)

The Versions

18/07 2015

dev-master

9999999-dev https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

dev-json-serializable

dev-json-serializable https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

dev-xml-api

dev-xml-api https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.0

1.0.0.0 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.0-RC0

1.0.0.0-RC https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-3.0

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.0-RC1

1.0.0.0-RC1 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.0-RC2

1.0.0.0-RC2 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.0-RC3

1.0.0.0-RC3 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.0-RC4

1.0.0.0-RC4 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.1

1.0.1.0 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.2

1.0.2.0 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.3

1.0.3.0 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.5

1.0.5.0 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.6

1.0.6.0 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview

18/07 2015

v1.0.7

1.0.7.0 https://github.com/Warsaalk/OGetIt

OGetIt is a open source PHP library for handling the new OGame API as of version 6.

  Sources   Download

LGPL-2.1

The Requires

  • php-64bit >=5.4.0
  • lib-curl *

 

by Klaas Van Parys

ogame universeview