community-sdks/spaceship-php
最新稳定版本:v1.0.1
Composer 安装命令:
composer require community-sdks/spaceship-php
包简介
Typed PHP SDK for the Spaceship API
README 文档
README
Typed PHP SDK for the Spaceship API.
- Composer package: community-sdks/spaceship-php
- Namespace: CommunitySDKs\Spaceship
Installation
composer require community-sdks/spaceship-php
Basic setup
use CommunitySDKs\Spaceship\Client; use CommunitySDKs\Spaceship\Config\Config; $client = new Client(Config::sandbox('API_KEY', 'API_SECRET'));
Custom endpoint override
use CommunitySDKs\Spaceship\Client; use CommunitySDKs\Spaceship\Config\Config; $config = Config::withCustomEndpoint( 'API_KEY', 'API_SECRET', 'https://spaceship.dev/api' ); $client = new Client($config);
Examples
Run the sandbox example templates from the examples/ folder.
Each script shows manual DTO construction with placeholder values you should replace before making real API calls.
PowerShell:
$env:SPACESHIP_API_KEY='your_key'; $env:SPACESHIP_API_SECRET='your_secret'; php examples/DomainsService.php
Bash (Mac / Linux / Git Bash):
SPACESHIP_API_KEY=your_key SPACESHIP_API_SECRET=your_secret php examples/DomainsService.php
See examples/README.md for the available scripts, required environment variables, and notes about replacing placeholder data.
Documentation
| Service | Description |
|---|---|
| DomainsService | Full domain lifecycle: list, availability checks, create, delete, renew, restore, transfer, contacts, nameservers, privacy, auth code, and transfer lock |
| DNSRecordsService | Manage DNS resource records for domains: save, delete, and list records |
| ContactsService | Save and read registrant and contact details |
| ContactsAttributesService | Save and read extended contact attributes per TLD |
| AsyncOperationsService | Retrieve the status and result of long-running async operations |
| SellerHubService | Manage SellerHub checkout links, domains, pricing, and verification records |
Run tests
composer install
composer test
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-13