Download the PHP package floopfloop/sdk without Composer
On this page you can find all versions of the php package floopfloop/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download floopfloop/sdk
More information about floopfloop/sdk
Files in floopfloop/sdk
Package sdk
Short Description Official PHP SDK for the FloopFloop API — build, refine, and manage FloopFloop projects from any PHP codebase.
License MIT
Homepage https://www.floopfloop.com
Informations about the package sdk
FloopFloop PHP SDK
Official PHP SDK for the FloopFloop API — build, refine, and manage FloopFloop projects from any PHP codebase.
Same surface as the Node, Python, Go, Rust, and Ruby SDKs. Calls the same /api/v1/* routes as the floop CLI.
Install
Requires PHP ≥ 8.1 and the json extension (bundled by default). No curl dependency — the transport uses PHP's stdlib stream layer.
Quickstart
Grab an API key at www.floopfloop.com/account/api-keys.
Resources
| Resource | Methods |
|---|---|
projects() |
create, list, get, status, cancel, reactivate, refine, conversations, stream, waitForLive |
subdomains() |
check, suggest |
secrets() |
list, set, remove |
library() |
list, clone |
usage() |
summary |
apiKeys() |
list, create, remove (accepts id OR name) |
uploads() |
create (presign + direct S3 PUT) |
user() |
me |
Every method returns an associative array shaped like the API response. Non-2xx responses throw FloopFloop\Error.
For longer end-to-end patterns — streaming a build, refining mid-deploy, attachment uploads, key rotation, retry-with-backoff — see the cookbook.
Streaming status
stream($ref, $handler, $interval, $maxWait) polls GET /api/v1/projects/:id/status every $interval seconds (default 2.0), de-duplicates identical consecutive snapshots, and returns the terminal event (live, failed, cancelled, archived). Throws FloopFloop\Error with a BUILD_FAILED / BUILD_CANCELLED / TIMEOUT code on non-success terminals.
waitForLive($ref, $interval, $maxWait) is a thin wrapper that returns the live event or throws.
Error handling
FloopFloop\Error exposes:
$code(string) — application error code. Known values:UNAUTHORIZED,FORBIDDEN,VALIDATION_ERROR,RATE_LIMITED,NOT_FOUND,CONFLICT,SERVICE_UNAVAILABLE,SERVER_ERROR,NETWORK_ERROR,TIMEOUT,BUILD_FAILED,BUILD_CANCELLED,UNKNOWN. Unknown server codes pass through verbatim.$status(int) — HTTP status.0for network / timeout failures.$requestId(?string) — thex-request-idresponse header, when present.$retryAfter(?float) — seconds parsed from theRetry-Afterresponse header (delta-seconds OR HTTP-date).getMessage()— the human-readable message from the server (or a local description for network errors).
Configuration
To inject a test double, pass an HttpClient implementation:
Development
Tests run offline against an in-memory FakeHttpClient — no network, no backend dependency.
License
MIT — see LICENSE.
All versions of sdk with dependencies
ext-json Version *