{"id":40896000,"url":"https://github.com/abtswath/psn-client","last_synced_at":"2026-01-22T02:23:07.841Z","repository":{"id":58863998,"uuid":"534194422","full_name":"abtswath/psn-client","owner":"abtswath","description":"PSN 游戏列表、奖杯进度、奖杯列表接口","archived":false,"fork":false,"pushed_at":"2022-09-08T12:24:10.000Z","size":17,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-20T05:29:15.205Z","etag":null,"topics":["api","playstation","playstation-api","ps-api","ps4","ps5","psn"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abtswath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-08T12:08:31.000Z","updated_at":"2023-12-06T07:33:13.000Z","dependencies_parsed_at":"2022-09-08T20:00:58.473Z","dependency_job_id":null,"html_url":"https://github.com/abtswath/psn-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abtswath/psn-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abtswath%2Fpsn-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abtswath%2Fpsn-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abtswath%2Fpsn-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abtswath%2Fpsn-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abtswath","download_url":"https://codeload.github.com/abtswath/psn-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abtswath%2Fpsn-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28651370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","playstation","playstation-api","ps-api","ps4","ps5","psn"],"created_at":"2026-01-22T02:23:07.774Z","updated_at":"2026-01-22T02:23:07.832Z","avatar_url":"https://github.com/abtswath.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PSN API 库  \n## 安装\n```shell\ncomposer require abtswath/psn-client\n```\n## 使用\n### 登录\n1. 登录 [PlayStation](https://www.playstation.com/)\n2. 到[这个页面](https://ca.account.sony.com/api/v1/ssocookie)获取 NPSSO token 并复制。\n3. 使用 NOSSO token 换取 oauth token\n```injectablephp\nuse Abtswath\\PSNClient\\Client;\n\n$npsso = '上一步获取的 NPSSO';\n$client = new Client();\n$authToken = $client-\u003eauth()-\u003elogin($npsso);\n$accessToken = $authToken-\u003egetAccessToken();\n$client-\u003esetAccessToken($accessToken);\n```\n### API\n```injectablephp\n$client-\u003euser()-\u003egameList(); // 获取用户游戏列表\n$client-\u003euser()-\u003etrophyTitles(); // 获取用户奖杯列表\n$client-\u003etrophy()-\u003etrophies(); // 获取某个游戏奖杯列表\n$client-\u003etrophy()-\u003eearned(); // 获取某个游戏已解锁的奖杯\n```\n## 参考\n本工具库的实现参考了 [https://andshrew.github.io/PlayStation-Trophies](https://andshrew.github.io/PlayStation-Trophies) 与 [https://github.com/Tustin/psn-php](https://github.com/Tustin/psn-php)，具体的接口返回示例与请求参数说明请参考以上文档。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabtswath%2Fpsn-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabtswath%2Fpsn-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabtswath%2Fpsn-client/lists"}