chrisob120 / wowsdk-php
PHP SDK for Blizzard's WoW API
Requires
- php: >=5.6.0
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: 5.2.12
This package is not auto-updated.
Last update: 2022-04-02 06:16:57 UTC
README
PHP WoW SDK is an SDK to interact the World of Warcraft API.
Note: This library utilizes GuzzlePHP
Main Features
- Services work with all applicable APIs (https://dev.battle.net/io-docs)
- Achievement
- Auction
- Boss
- Challenge Mode
- Character Profile
- Guild Profile
- Item
- Mount
- Pet
- PVP
- Quest
- Realm Status
- Recipe
- Resources
- Spell
- Zone
- Supports Blizzard's OAuth 2 authentication process to access user profile information
- Utilizes GuzzlePHP's LastModified header option with caching to decrease HTTP requests
Requirements
- PHP >= 5.6
- cURL
- JSON
Installing via Composer
Composer is a dependency management tool for PHP which will allow you to easily add WoW SDK to your project. Simply add "chrisob120/wowsdk-php" to your project's composer.json file.
{ "require": { "chrisob120/wowsdk-php": "1.0.*" } }
Basic Usage
The WowApi class contains the services that hold the methods which allow you to access the WoW API. Basic access is quite simple and only requires your mashery API key.
use WowApi\WowApi; $api = new WowApi('your mashery api key'); $api->bossService->getBoss(24723);
All optional parameters default to the US region with the 'en_US' locale. These options can be adjusted as shown below. Here is a list of different regions and locales provided by Blizzard.
use WowApi\WowApi; $options = [ 'region' => 'eu', 'locale' => 'en_GB' ]; $api = new WowApi('your mashery api key', $options); $api->bossService->getBoss(24723);
For more information, check out the wiki which includes:
Todo
- Improve services for common uses