Download the PHP package shorter/sdk without Composer
On this page you can find all versions of the php package shorter/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor shorter
Package sdk
Short Description PHP SDK for the shorter.sh URL shortener
License MIT
Homepage https://shorter.sh
Package sdk
Short Description PHP SDK for the shorter.sh URL shortener
License MIT
Homepage https://shorter.sh
Please rate this library. Is it a good library?
Informations about the package sdk
shorter/sdk
PHP SDK for the shorter.sh URL shortener. Requires PHP >=8.1 and Guzzle 7.
Installation
Quick Start
Authentication
The API key is resolved in order:
api_keyconstructor parameterSHORTER_API_KEYenvironment variable
The key must start with sk_.
Analytics
Dimensions
Available breakdown dimensions: country, device_type, browser, os, referrer_domain, language
Error Handling
Exception Classes
| Class | Status | Default Code |
|---|---|---|
ValidationException |
400 | VALIDATION_ERROR |
AuthenticationException |
401 | AUTH_REQUIRED |
ForbiddenException |
403 | FORBIDDEN |
NotFoundException |
404 | NOT_FOUND |
RateLimitException |
429 | RATE_LIMITED |
ServerException |
500 | SERVER_ERROR |
NetworkException |
0 | NETWORK_ERROR |
All extend ShorterException, which extends \RuntimeException.
Custom HTTP Client
Inject your own Guzzle client for proxies, timeouts, or testing:
Requirements
- PHP >= 8.1
- Guzzle >= 7.0
License
MIT
All versions of sdk with dependencies
PHP Build Version
Package Version
The package shorter/sdk contains the following files
Loading the files please wait ...