Skip to content

Commit

Permalink
documentation and tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
Pillarish committed Sep 7, 2019
1 parent bbf9fad commit dada459
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,26 @@ telsa_blizzard_connection:
client_secret: ~
```
### General Usage
```php
// create your desired API connection
$api = $this->get('telsa_blizzard_connection.apis.world_of_warcraft.character_profile_api');

// set the region
$api->setRegion('eu');

// set the required params
$api->setCharacterName('Pillaren');
$api->setRealm('the-venture-co');

// call the desired endPoint
$char = $api->getCharacter();

// call with any required extra details
$char = $api->getCharacter(['professions', 'mounts', 'talents']);

// some helper functions. eg.
$charWithMounts = $api->getCharacterMounts();
$charWithTalents = $api->getCharacterTalents();
```
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function getConfigTreeBuilder()
$rootNode = $treeBuilder->root('telsa_blizzard_connection');

$rootNode->children()
->scalarNode('client_id')->end()
->scalarNode('client_id')->info('Required for connection Blizzard API')->end()
->scalarNode('client_secret')->end()
->end();

Expand Down
4 changes: 0 additions & 4 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Learn more about services, parameters and containers at
# https://symfony.com/doc/current/service_container.html
parameters:
telsa_blizzard_connection.client_id:
telsa_blizzard_connection.client_secret:

services:

telsa_blizzard_connection.apis.world_of_warcraft.character_profile_api:
Expand Down

0 comments on commit dada459

Please sign in to comment.