curse / smite-api
Easy access to the Hi-Rez Studios API for Smite
This package's canonical repository appears to be gone and the package has been frozen as a result.
v1.0.0
2015-06-18 15:08 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ^5.3
- onoi/cache: ^1.2
Requires (Dev)
This package is not auto-updated.
Last update: 2019-05-27 17:47:19 UTC
README
A simple object-oriented approach to data in the Smite API (a game from Hi-Rez Studios).
For use within WordPress, consider using the official WP plugin from Hi-Rez.
For more information about the Smite API, refer to the official API documentation.
Requirements
- PHP 5.4 or greater
- DevID and AuthKey from Hi-Rez (submit this form)
Installation
$ composer require curse/smite-api
Usage
// Create api $api = new Curse\Smite\API(DEV_ID, AUTH_KEY); // optional session caching via many providers // see https://github.com/onoi/cache/ $api->useCache(new \Onoi\Cache\ZendCache($zendCacheThing)); $api->useCache(new \Onoi\Cache\DoctrineCache($doctrineCacheThing)); $api->useCache(new \Onoi\Cache\MediaWikiCache(wfGetCache(CACHE_ANYTHING))); // returns objects by default $api->preferredFormat('array'); // will now return assoc arrays // returns english language gods and item names by default $api->preferredLanguage('es'); // use IETF language tag to select language // (latin america becomes es-419) // get player info $playerData = $api->getplayer($playerName); // get info on silver 3 ladder in season 4 $ladderData = $api->getleagueleaderboard('Conquest5v5', 'Silver3', 4);
Contributing
- Fork
git clone
composer install
- Hack
- Confirm (and write new) passing tests:
vendor/bin/phpunit
- Submit pull request
License
Copyright 2015 Curse, Inc.
Free for you to use under LGPLv3. See LICENSE for an abundance of words.