Skip to content

community-sdks/spaceship-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

community-sdks/spaceship-php

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages