vhin0210/php-psnpublictrophies
Composer 安装命令:
composer require vhin0210/php-psnpublictrophies
包简介
PHP library to get psn public trophies by psn id
README 文档
README
This is a simple PHP library that will get PSN profile and trophies by PSN ID.
NOTE: Your PSN account must have 2-Step Verification enabled
Install via Composer
composer require vhin0210/php-psnpublictrophies
How to use
Get Access Token
$psnAuth = new \PSNPublicTrophiesLib\PSNPublicTrophiesAuth(); // Get Ticket UUID from Playstation Network by loging in to Playstation Network (works best with 2-Step Verification) // Get the login URL. Copy the URL and open in a new tab // Login and copy the whole URL. Your PSN account must have 2-Step Verification enabled, don't enter the Verification Code on that PS form. $authUrl = $psnAuth->getAuthenticateUrl(); // Get Ticket UUID from the URL you copied. $auth_url_parameters = $psnAuth->getAuthenticateUrlParameters($ticket_uuid_url); $ticket_uuid = NULL; if (isset($auth_url_parameters['ticket_uuid'])) { $ticket_uuid = $auth_url_parameters['ticket_uuid']; } // Authenticate with all the credentials // $psn_id - your PSN ID // $password - your password // $ticket_uuid - the ticket uuid from the url you copied from playstation network // $verification_code - code from the SMS you get from Playstation $auth = $psnAuth->authenticate($psn_id, $password, $ticket_uuid, $verification_code); // Get the access token (array). You can save this token in your database $psn_account_token = $auth->GetTokens();
Refresh Token
// Initialize the library with the access token. This will automatically refresh the token. // $psn_account_token - the access token (array) $psnAuth = new \PSNPublicTrophiesLib\PSNPublicTrophiesAuth($psn_account_token); // Get the new access token $psn_account_token = $psnAuth->access_token;
Get Profile
$psnAuth = new \PSNPublicTrophiesLib\PSNPublicTrophiesAuth($psn_account_token); $profileData = $psnAuth->getProfile();
vhin0210/php-psnpublictrophies 适用场景与选型建议
vhin0210/php-psnpublictrophies 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 200 次下载、GitHub Stars 达 4, 最近一次更新时间为 2017 年 08 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 vhin0210/php-psnpublictrophies 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vhin0210/php-psnpublictrophies 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 200
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-08-29