Skip to content
This repository was archived by the owner on Aug 12, 2023. It is now read-only.

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SpaceIs PHP SDK

PHP SDK for SpaceIs.pl's API v3.

Check SpaceIs documentation for API responses.

Class init:

<?php

use SpaceCode\SpaceIs\SpaceIs;

require_once __DIR__ . '/vendor/autoload.php';

$spaceis = new SpaceIs('apiKey', 'apiUrl (optional)');

Get user info:

$spaceis->user->me();

Servers:

$spaceis->server->getAll();
$spaceis->server->getSpecific('id/slug');
$spaceis->server->getCommands('id', 'serverToken');
$spaceis->server->getLatestBuys('id/slug', '(int) limit, default: 10');
$spaceis->server->getRichest('id/slug', '(int) limit, default: 10');

Discount code:

$spaceis->discountCode->get('code');

Voucher:

$spaceis->voucher->use('nick', 'code'); //throws VoucherNotFoundException & VoucherUsedException

Subpage:

$spaceis->subpage->get('slug');

Variant:

$spaceis->variant->get('serverId/slug', 'productId');

Transaction:

$spaceis->transaction->init('serverId/slug', 'productId', 'variantId', 'nick', 'method', 'email', '(nullable) additional', '(nullable) discountCodeId');
$spaceis->transaction->info('transactionId', '(bool) extended, default: false');

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages