Download the PHP package alejandro-ap00/space-traders-php-sdk without Composer
On this page you can find all versions of the php package alejandro-ap00/space-traders-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alejandro-ap00/space-traders-php-sdk
More information about alejandro-ap00/space-traders-php-sdk
Files in alejandro-ap00/space-traders-php-sdk
Package space-traders-php-sdk
Short Description A Space Traders SDK for PHP
License MIT
Homepage https://github.com/alejandroaporras/space-traders-php-sdk
Informations about the package space-traders-php-sdk
A Space Traders SDK for PHP
An PHP SDK for the SpaceTraders API this package provides an expressive way to interact with all endpoints available.
Installation
You can install the package via composer:
Usage
To get started, please create an instance of the SDK
Handling Pagination
There are several methods, such as agents()
, contracts()
and ships()
to will return paginated results. To
get the next page of results just call next() on a result. If there are no more results, that method returns null.
On paginated results, there are also some more convenience methods:
results()
: get the results. A results object is also iterable, so you can also get to the results by simply using the object in a loopnext()
: fetch the next page of resultsprevious()
: fetch the previous page of resultscurrentPage()
: get the current page numbertotal()
: get the total number of results across all pagestotalPages()
: get the total number of pagesnextPage()
: get the page number for the next page of resultspreviousPage()
: get the page number for the previous page of results
Registering
You can generate a new token using the register method
Getting API status
Managing Contracts
On a Contract
instance you can call
Managing Agents
Managing Factions
Managing Fleet
On a Ship
instance you can call
Managing Systems
On a System
instance you can call
and in a Waypoint
instance you can call
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Alejandro A
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of space-traders-php-sdk with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/collections Version ^12.12
saloonphp/pagination-plugin Version ^2.0
saloonphp/rate-limit-plugin Version ^2.0
saloonphp/saloon Version ^3.0