techenby / octoprint-sdk
A PHP SDK for OctoPrint.
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3.1|^7.0
- illuminate/support: ^8.0|^9.0
Requires (Dev)
- mockery/mockery: ^1.3.1
- phpunit/phpunit: ^8.4|^9.0
README
The OctoPrint SDK provides an expressive interface for interacting with OctoPrint's Rest API and managing OctoPrint instances servers. The structure of this repository is based on the Laravel Forge SDK.
Installation
To install the SDK in your project you need to require the package via composer:
composer require techenby/octoprint-sdk
Basic Usage
You can create an instance of the SDK like so:
$pikachu = new TechEnby\OctoPrint(PRINTER_URL, API_TOKEN);
Using the OctoPrint
instance you may perform multiple actions as well as retrieve the different resources OctoPrint's API provides:
$files = $pikachu->files();
Rest Endpoints and SDK Methods
Contributing
Thank you for considering contributing to OctoPrint SDK! All pull requests are welcome, please follow the conventions set out in existing files.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
OctoPrint SDK is open-sourced software licensed under the MIT license.