Download the PHP package podio-labs/podio-client without Composer
On this page you can find all versions of the php package podio-labs/podio-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download podio-labs/podio-client
More information about podio-labs/podio-client
Files in podio-labs/podio-client
Package podio-client
Short Description Modern, framework-agnostic PHP client for the Podio API. PSR-18, OAuth handled, fully typed.
License MIT
Homepage https://github.com/podio-labs/podio-client
Informations about the package podio-client
Podio Client
A framework-agnostic PHP client for the Podio API, built on PSR-18, bring your own HTTP client, everything else is wired for you.
In this example, we build a client and create an item, authentication is handled for you:
Using Laravel? See
podio-labs/podio-laravel.
Installation
Requires PHP 8.3+.
You can install the package via composer:
Ensure the php-http/discovery composer plugin is allowed to run, or install a PSR-18 client manually if your project does not already have one:
Usage
Creating a client
Authentication
A client always needs your Podio API credentials plus one authentication method, slotted into the builder above. The token manager fetches, caches and refreshes the access token for you.
| Method | Builder call | Use when |
|---|---|---|
| Password | ->withPasswordAuth($username, $password) |
service account, server-to-server |
| Authorization code | ->withAuthorizationCodeAuth($code, $redirectUri) |
per-user OAuth2, after the user authorises your app |
| App | ->withAppAuth($appId, $appToken) |
a single Podio app via its app token |
| Access token | ->withAccessToken($token, $expiresAt, $refreshToken) |
reuse a token you stored |
Read (and persist) the current token:
Endpoints
Raw requests
For anything not covered by an endpoint, send a request directly:
Rate limit
How it works
PodioClient wraps a transporter over your PSR-18 client (or one discovered via php-http/discovery) and a token manager that:
- authenticates with the configured grant (password, authorization code, app, or a seeded access token) and caches the access token when you pass a PSR-16 cache;
- refreshes the token automatically:
send()retries once on an expired-token response, using the refresh token when there is one, otherwise re-authenticating.
Every endpoint (items(), files(), …) is a small typed wrapper over send().
Testing
To test code that uses the client without hitting Podio, inject a stub PSR-18 client:
License
Podio Client is open-sourced software licensed under the MIT license.
All versions of podio-client with dependencies
php-http/discovery Version ^1.14
psr/http-client Version ^1.0
psr/http-client-implementation Version ^1.0
psr/http-factory Version ^1.0
psr/http-factory-implementation Version ^1.0
psr/http-message Version ^1.0 || ^2.0
psr/simple-cache Version ^3.0