-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added new method for get star rating information - Added category id with all concepts - Update parameters for RequestProductList
- Loading branch information
ishmukhametov_tf
committed
Jan 11, 2024
1 parent
321ae22
commit bd1b983
Showing
13 changed files
with
178 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use PlaystationStoreApi\Client; | ||
use GuzzleHttp\Client as HTTPClient; | ||
use PlaystationStoreApi\Enum\RegionEnum; | ||
use PlaystationStoreApi\Request\RequestConceptStarRating; | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
const API_URL = 'https://web.np.playstation.com/api/graphql/v1/'; | ||
|
||
$client = new Client(RegionEnum::UNITED_STATES, new HTTPClient(['base_uri' => API_URL, 'timeout' => 5])); | ||
|
||
/** | ||
* Example for https://store.playstation.com/en-us/concept/10002694 | ||
*/ | ||
$result = $client->get(new RequestConceptStarRating('10002694')); | ||
|
||
echo json_encode($result, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use PlaystationStoreApi\Client; | ||
use GuzzleHttp\Client as HTTPClient; | ||
use PlaystationStoreApi\Enum\RegionEnum; | ||
use PlaystationStoreApi\Request\RequestProductStarRating; | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
const API_URL = 'https://web.np.playstation.com/api/graphql/v1/'; | ||
|
||
$client = new Client(RegionEnum::UNITED_STATES, new HTTPClient(['base_uri' => API_URL, 'timeout' => 5])); | ||
|
||
/** | ||
* Example for https://store.playstation.com/en-us/product/UP0082-PPSA10664_00-FF16SIEA00000002 | ||
*/ | ||
$result = $client->get(new RequestProductStarRating('UP0082-PPSA10664_00-FF16SIEA00000002')); | ||
|
||
echo json_encode($result, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace PlaystationStoreApi\Request; | ||
|
||
final class RequestConceptStarRating implements BaseRequest | ||
{ | ||
public function __construct(public readonly string $conceptId) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace PlaystationStoreApi\Request; | ||
|
||
final class RequestProductStarRating implements BaseRequest | ||
{ | ||
public function __construct(public readonly string $productId) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters