Skip to content

Commit b9dd1c4

Browse files
authored
Merge pull request #24 from LogansUA/feature-update-project
General updates
2 parents 7dc1ace + 5eb052d commit b9dd1c4

19 files changed

+221
-171
lines changed

.github/CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contributing
2+
3+
First of all, **thank you** for contributing, **you are awesome**!
4+
5+
Here are a few rules to follow in order to ease code reviews, and discussions before
6+
maintainers accept and merge your work.
7+
8+
As library follows the next standards: [PSR-0](http://www.php-fig.org/psr/psr-0/), [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/), [PSR-4](http://www.php-fig.org/psr/psr-4/). You also MUST follow them.
9+
10+
You SHOULD follow the [Symfony Coding Standards](http://symfony.com/doc/current/contributing/code/standards.html).
11+
If you don't know about any of them, you should really read the recommendations.
12+
You can use a helpful tool [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) with a last version of [Symfony standards](https://github.com/escapestudios/Symfony2-coding-standard).
13+
Or you can use a [PHP-CS-Fixer](http://cs.sensiolabs.org/) tool to fix all coding style issues.
14+
15+
You SHOULD write documentation.
16+
17+
Please, write [commit messages that make sense](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), and [rebase your branch](http://git-scm.com/book/en/Git-Branching-Rebasing) before submitting your Pull Request.
18+
19+
One may ask you to [squash your commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) too. This is used to "clean" your Pull Request before merging it (we don't want commits such as `fix tests`, `fix 2`, `fix 3`, etc.).
20+
21+
Thank you!

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ API client for Blizzard API written in PHP. [Blizzard API Documentation](https:/
1010
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/b103523d-7f46-4c74-94f9-cf41462b298a/mini.png)](https://insight.sensiolabs.com/projects/b103523d-7f46-4c74-94f9-cf41462b298a)
1111

1212
## Installation
13-
### Method 1
1413
```
15-
composer require logansua/blizzard-api-client
14+
$ composer require logansua/blizzard-api-client
1615
```
1716
This command requires you to have Composer installed globally, as explained
1817
in the [Composer documentation](https://getcomposer.org/doc/00-intro.md).
19-
### Method 2
20-
```
21-
git clone https://github.com/LogansUA/blizzard-api-php-client.git
22-
```
2318

2419
## Basic usage
2520
```PHP
@@ -40,11 +35,15 @@ echo $response->getBody();
4035
```
4136

4237
## List of available API services
43-
* World of Warcraft ([example](https://github.com/LogansUA/blizzard-api-php-client/blob/master/examples/WorldOfWarcraftExample.php))
44-
* Diablo 3 ([example](https://github.com/LogansUA/blizzard-api-php-client/blob/master/examples/DiabloExample.php))
45-
* Starcraft ([example](https://github.com/LogansUA/blizzard-api-php-client/blob/master/examples/StarcraftExample.php))
46-
* Community OAuth ([example](https://github.com/LogansUA/blizzard-api-php-client/blob/master/examples/CommunityOAuthExample.php))
47-
* Game Data ([example](https://github.com/LogansUA/blizzard-api-php-client/blob/master/examples/GameDataExample.php))
38+
* World of Warcraft ([example](docs/examples/WorldOfWarcraftExample.php))
39+
* Diablo 3 ([example](docs/examples/DiabloExample.php))
40+
* Starcraft ([example](docs/examples/StarcraftExample.php))
41+
* Community OAuth ([example](docs/examples/CommunityOAuthExample.php))
42+
* Game Data ([example](docs/examples/GameDataExample.php))
43+
44+
## Contributing
45+
46+
See [CONTRIBUTING](.github/CONTRIBUTING.md) file.
4847

4948
## License
50-
This software is published under the [MIT License](https://github.com/LogansUA/blizzard-api-php-client/blob/master/LICENSE)
49+
This software is published under the [MIT License](LICENSE)

composer.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,34 @@
22
"name": "logansua/blizzard-api-php-client",
33
"description": "API client for blizzard API written in PHP",
44
"keywords": ["blizzard", "world of warcraft", "api", "client"],
5-
"minimum-stability": "dev",
5+
"homepage": "https://github.com/LogansUA/blizzard-api-php-client",
66
"type": "library",
77
"license": "MIT",
88
"authors": [
99
{
1010
"name": "Oleg Kachinskiy",
11-
"email": "Logansoleg@gmail.com"
11+
"email": "logansoleg@gmail.com",
12+
"role": "Creator"
13+
},
14+
{
15+
"name": "Community",
16+
"homepage": "https://github.com/LogansUA/blizzard-api-php-client/graphs/contributors",
17+
"role": "Contributors"
1218
}
1319
],
20+
"support": {
21+
"email": "logansoleg@gmail.com",
22+
"issues": "https://github.com/LogansUA/blizzard-api-php-client/issues"
23+
},
1424
"require": {
1525
"php": ">=5.6.0",
16-
"guzzlehttp/guzzle": "^6.1@dev",
26+
"guzzlehttp/guzzle": "^6.2",
1727
"symfony/options-resolver": "^3.0"
1828
},
1929
"autoload": {
2030
"psr-4": {
2131
"BlizzardApi\\": "src/"
2232
}
23-
}
33+
},
34+
"minimum-stability": "stable"
2435
}

composer.lock

Lines changed: 24 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Include composer autoload file
4-
require_once __DIR__.'/../vendor/autoload.php';
4+
require_once __DIR__.'/../../vendor/autoload.php';
55

66
// Create a new Blizzard client with Blizzard API key and secret
77
$client = new \BlizzardApi\BlizzardClient('apiKey', 'apiSecret');
@@ -12,8 +12,11 @@
1212
// Use API method for getting specific data
1313
$response = $diablo->getProfileUser();
1414

15-
// $response->getStatusCode(); - accessing response status code
16-
// $response->getHeaders(); - accessing response headers
15+
// Accessing response status code
16+
$response->getStatusCode();
17+
18+
// Accessing response headers
19+
$response->getHeaders();
1720

1821
// Show response body
1922
echo $response->getBody();
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Include composer autoload file
4-
require_once __DIR__.'/../vendor/autoload.php';
4+
require_once __DIR__.'/../../vendor/autoload.php';
55

66
// Create a new Blizzard client with Blizzard API key and secret
77
$client = new \BlizzardApi\BlizzardClient('apiKey', 'apiSecret');
@@ -12,8 +12,11 @@
1212
// Use API method for getting specific data
1313
$response = $diablo->getItemDataById('Unique_Shoulder_103_x1');
1414

15-
// $response->getStatusCode(); - accessing response status code
16-
// $response->getHeaders(); - accessing response headers
15+
// Accessing response status code
16+
$response->getStatusCode();
17+
18+
// Accessing response headers
19+
$response->getHeaders();
1720

1821
// Show response body
1922
echo $response->getBody();
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Include composer autoload file
4-
require_once __DIR__.'/../vendor/autoload.php';
4+
require_once __DIR__.'/../../vendor/autoload.php';
55

66
// Create a new Blizzard client with Blizzard API key and secret
77
$client = new \BlizzardApi\BlizzardClient('apiKey', 'apiSecret');
@@ -12,8 +12,11 @@
1212
// Use API method for getting specific data
1313
$response = $gameData->getEraLeaderboard(1, 'rift-barbarian');
1414

15-
// $response->getStatusCode(); - accessing response status code
16-
// $response->getHeaders(); - accessing response headers
15+
// Accessing response status code
16+
$response->getStatusCode();
17+
18+
// Accessing response headers
19+
$response->getHeaders();
1720

1821
// Show response body
1922
echo $response->getBody();
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Include composer autoload file
4-
require_once __DIR__.'/../vendor/autoload.php';
4+
require_once __DIR__.'/../../vendor/autoload.php';
55

66
// Create a new Blizzard client with Blizzard API key and secret
77
$client = new \BlizzardApi\BlizzardClient('apiKey', 'apiSecret');
@@ -12,8 +12,11 @@
1212
// Use API method for getting specific data
1313
$response = $starcraft->getAchievements();
1414

15-
// $response->getStatusCode(); - accessing response status code
16-
// $response->getHeaders(); - accessing response headers
15+
// Accessing response status code
16+
$response->getStatusCode();
17+
18+
// Accessing response headers
19+
$response->getHeaders();
1720

1821
// Show response body
1922
echo $response->getBody();

examples/WorldOfWarcraftExample.php renamed to docs/examples/WorldOfWarcraftExample.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Include composer autoload file
4-
require_once __DIR__.'/../vendor/autoload.php';
4+
require_once __DIR__.'/../../vendor/autoload.php';
55

66
// Create a new Blizzard client with Blizzard API key and secret
77
$client = new \BlizzardApi\BlizzardClient('apiKey', 'apiSecret');
@@ -14,8 +14,11 @@
1414
'fields' => 'achievements,challenge',
1515
]);
1616

17-
// $response->getStatusCode(); - accessing response status code
18-
// $response->getHeaders(); - accessing response headers
17+
// Accessing response status code
18+
$response->getStatusCode();
19+
20+
// Accessing response headers
21+
$response->getHeaders();
1922

2023
// Show response body
2124
echo $response->getBody();

0 commit comments

Comments
 (0)