Migrate from PA-API v5 to Amazon Creators API#54
Merged
Conversation
- Replace PA-API v5 SDK with Creators API SDK (app/Amazon/) - Update PHP requirement to 8.1+ - Update Guzzle to v7.x - Add autoload configuration for Amazon namespace - Exclude Amazon SDK from phpcs checks - Add app/README.md with SDK update instructions Co-authored-by: Claude <noreply@anthropic.com>
- Add <file> tags in phpcs.ruleset.xml to specify scan targets - Remove find command from composer lint/fix scripts - Prevents memory exhaustion from scanning Amazon SDK files Co-authored-by: Claude <noreply@anthropic.com>
- AmazonConstants.php: Use Creators API SDK classes, change from searchItems(request) to searchItems(marketplace, request), update OffersV2 price access, change cache key prefix - AmazonLocales.php: Add get_marketplace() and get_version() methods for Creators API version mapping (NA:2.1, EU:2.2, FE:2.3) - Amazon.php: Change credentials from accessKey/secretKey to credentialId/credentialSecret, update service description Co-authored-by: Claude <noreply@anthropic.com>
- Add bin/lint-sdk.php for checking SDK PHP syntax - Remove bin/replacer.php (PA-API SDK fixer no longer needed) - Update README with Creators API migration notes and breaking changes - Document PHP 8.1 requirement Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
SDK
app/Amazon/に Amazon Creators API SDK 1.1.2 を配置thewirecutter/paapi5-php-sdk) を削除Core Code
AmazonConstants.php: Creators API 対応に書き換えsearchItems($request)→searchItems($marketplace, $request)getOffers()→getOffersV2()AmazonLocales.php:get_marketplace()/get_version()追加Amazon.php: 認証情報フィールド変更accessKey→credentialIdsecretKey→credentialSecretBuild & Lint
bin/lint-sdk.php追加(SDK構文チェック)bin/replacer.php削除(旧SDK用、不要に)phpcs.ruleset.xml更新(SDKを除外)Breaking Changes
Note
Amazon Creators API は過去30日間に10件以上の売上がないとAPIアクセスが制限されます。
売上要件を満たさない場合は、5.2.0で追加されたfallback機能が自動的に使用されます。
Test plan
php bin/lint-sdk.php)composer lint)🤖 Generated with Claude Code