New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

xklusive/laravel-battlenet-api

Laravel 5 client for Battle.net API
361 9
Install
composer require xklusive/laravel-battlenet-api
Latest Version:1.1
PHP:>=7.0.0
Laravel:5
License:MIT
Last Updated:Sep 27, 2018
Links: GitHub  ·  Packagist
Maintainer: xklusive

Laravel 5 Battle.net API

Latest Version on Packagist Software License Build Status Code Quality SensioLabsInsight StyleCI Codacy Badge Total Downloads Average time to resolve an issue Percentage of issues still open

This package allows to call the Battle.net API.

Once installed you can do stuff like this:

use Xklusive\BattlenetApi\Services\WowService;

public function index(WowService $wow)
{
	$achievement = $wow->getAchievement(2144);

	dd($achievement);

	//Ouput: 
	//Collection {#236 ▼
  	//	#items: array:10 [▼
	//	    "id" => 2144
	//	    "title" => "Voyages au bout du monde"
	//	    "points" => 50
	//	    "description" => "Accomplir les hauts faits des évènements mondiaux listés ci-dessous."
	//	    "reward" => "Récompense : proto-drake pourpre"
	//	    "rewardItems" => array:1 [▶]
	//	    "icon" => "achievement_bg_masterofallbgs"
	//	    "criteria" => array:8 [▶]
	//	    "accountWide" => true
	//	    "factionId" => 2
	//	]
}

Battle.net API key

Before you be able to make requests to the Battle.net API, you need to provide your API key. If you don't have an API key, refer to https://dev.battle.net/docs to get your API key. Without a Battle.net API key, the package will not be functionnal.

Install

You can install the pacakge via composer:

$ composer require xklusive/laravel-battlenet-api

Then this provider must be installed :

// config/app.php
'providers' => [
	...
    Xklusive\BattlenetApi\BattlenetApiServiceProvider::class,
];

The last required step is to publish configuration's file in your application with :

$ php artisan vendor:publish --provider="Xklusive\BattlenetApi\BattlenetApiServiceProvider" --tag="config"

Once the config file is published setup the required variables in the .env file :

// .env

BATTLENET_KEY=[YOUR_API_KEY]
BATTLENET_REGION=eu

Congratulations, you have successfully installed Laravel Battle.net API !

Related Packages

railken/lara-eye
38,933 38
api
juampi92/api-resources

Manage your resources maintaining API versioning

934,790 112
tailflow/laravel-orion

Orion for Laravel allows you to build a fully featured REST API based on your El...

837,569 1,591
unlu/laravel-api-query-builder

Laravel API Query Builder Package.

721,231 328
juampi92/phecks

A package to run custom PHP checks

412,810 4

Version History

Version Released PHP Laravel License
1.1 >=7.0.0 ^5.5 MIT
v1.0.1 >=7.0.0 ^5.5 MIT
v1.0 >=7.0.0 ^5.5 MIT
0.9.1 >=5.6.0 ~5.3.0 MIT
0.9 >=5.6.0 ~5.3.0 MIT