Skip to content

Commit

Permalink
Rename Client::PLATFORM to Client::PLATFORMS.
Browse files Browse the repository at this point in the history
  • Loading branch information
florianorineveu committed Aug 19, 2020
1 parent fda830c commit d924b85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use \OwAPI\Client;
$client = new Client();

// Get profile data for player Ori#21337 (it's me!),
$response = $client->profile(Client::PLATFORM['PC'], Client::REGIONS['EU'], 'Ori#21337');
$response = $client->profile(Client::PLATFORMS['PC'], Client::REGIONS['EU'], 'Ori#21337');

// Read the response
if ($response->isSuccess()) {
Expand All @@ -49,11 +49,11 @@ if ($response->isSuccess()) {

// Other available methods:
// - ALL profile data, heavy endpoint
$completeStats = $client->completeStats(Client::PLATFORM['PC'], Client::REGIONS['EU'], 'Ori#21337');
$completeStats = $client->completeStats(Client::PLATFORMS['PC'], Client::REGIONS['EU'], 'Ori#21337');

// - Get profile data for specific heroes:
$heroesStats = $client->heroes(
Client::PLATFORM['PC'],
Client::PLATFORMS['PC'],
Client::REGIONS['EU'],
'Ori#21337',
['brigitte', 'mercy', 'ana']
Expand Down
2 changes: 1 addition & 1 deletion src/OwAPI/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Client
'US' => 'us',
];

const PLATFORM = [
const PLATFORMS = [
'NINTENDO_SWITCH' => 'nintendo_switch',
'PC' => 'pc',
'PLAYSTATION' => 'psn',
Expand Down

0 comments on commit d924b85

Please sign in to comment.