Add one-off script endpoints to Server resource - #89
Merged
Conversation
Support running ad-hoc scripts on a server and polling their execution status via the new Ploi API endpoints.
Contributor
Author
|
Hi @Cannonb4ll, would it be possible to get this merged soon? It would be helpful to our workflow. I created this PR during a GitHub outage so you may not have been notified. Thanks! |
Member
|
Interesting, I was indeed not notified, but now I am! Will check up on this tonight👌 |
Contributor
Author
|
Perfect, thank you! |
Cannonb4ll
added a commit
that referenced
this pull request
Aug 24, 2026
…its (#90) The get* prefix is reserved for accessors on Resource (getId, getPloi, getServer, getEndpoint), which Server inherits. Endpoint-calling methods are noun-only: logs(), monitoring(), phpVersions(). The method was added in #89 after the 2.1 tag, so it is unreleased and can be renamed without a deprecated alias. Also asserts the new endpoints build correctly in testBuildsUrlCorrectly() (the only test that does not hit the live API) and documents that $content is capped at 7500 characters and $user defaults to "ploi".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support running ad-hoc scripts on a server and polling their execution status via the new Ploi API endpoints.
A few notes:
I added these functions to src/Ploi/Resources/Server.php rather than src/Ploi/Resources/Script.php since the API endpoints are scoped to the server endpoint.
Same story for the README, but i added the new SDK functions to both the script and server sections to make it easier for users to find.